Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

winsock

Posted on 1999-07-07
4
Medium Priority
?
191 Views
Last Modified: 2013-11-13
In a client/server aplication, how can I make the server detect where (RemoteHost) came the data?

Thx for your help
0
Comment
Question by:alexbeaty
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 3

Accepted Solution

by:
Iexpert earned 200 total points
ID: 1522541
The server has a socket which is "filled" with info when the
client connects. Therefore the server can read the address
and the port properties to know where the client came from.

To know the actual name of the machine, then you need to
do a reverse name lookup on the address.

To do this you need to call the gethostbyname function in
winsock with the address in the following format:

4.3.2.1.in-addr.arpa

I.E. backwards. (the origonal address was 1.2.3.4)
0
 

Author Comment

by:alexbeaty
ID: 1522542
can you give me an example source?

Thx
0
 

Author Comment

by:alexbeaty
ID: 1522543
*****************
****************
****************


Can you give me a examle source?

Thx
0
 

Author Comment

by:alexbeaty
ID: 1522544

      ****************
      ****************


      Can you give me a source example?

      Thx





0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question