Windows Socket Question 
Author Message
 Windows Socket Question

I have a simple single client/server application.  I want to get the ip
address (not the dns name) of the connecting client socket.  How can I get
this?  Can I use the SOCKADDR structure to get the address?


Tue, 13 Sep 2005 14:55:27 GMT  
 Windows Socket Question
Try one of these (hyperlinks won't work):
BOOL GetPeerName(
   CString& rPeerAddress,
   UINT& rPeerPort
);
BOOL GetPeerName(
   SOCKADDR* lpSockAddr,
   int* lpSockAddrLen
);Rick


Quote:
> I have a simple single client/server application.  I want to get the ip
> address (not the dns name) of the connecting client socket.  How can I get
> this?  Can I use the SOCKADDR structure to get the address?



Tue, 13 Sep 2005 16:15:25 GMT  
 Windows Socket Question
The IP Address is in the SOCKADDR structure. If you view the structure
in quick view you will see if in bytes.

On Fri, 28 Mar 2003 13:55:27 GMT, "Brian Millikan"

Quote:

>I have a simple single client/server application.  I want to get the ip
>address (not the dns name) of the connecting client socket.  How can I get
>this?  Can I use the SOCKADDR structure to get the address?



Thu, 15 Sep 2005 00:40:43 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Windows Sockets question

2. Windows Sockets Question

3. Windows socket question: How can I detect if the peer socket is closed ?

4. Windows Socket question - Can these be used as local machine interprocess communication?

5. Sockets and windows event question.

6. Windows Socket and Linux Socket

7. windows sockets

8. How to list open sockets in windows?

9. Windows client does not connect to Unix socket

10. Sockets select() equivalent for Windows???

11. Windows socket problem (please help)

12. Windows Sockets Network Programming

 

 
Powered by phpBB® Forum Software