I use GetPeerName and inet_ntoa, but the result is always incorrent. Anybody can give some code on that?
Posted on 2003-10-12 07:33:54 by optimus
.data
SocketAddr sockaddr_in <>
SocketAddrSize dd 0 ;; This is the size of the above structure returned by accept()

.code
invoke accept, ListeningSocket, addr SocketAddr, addr SocketAddrSize

invoke inet_ntoa, dword ptr SocketAddr.sin_addr
invoke MessageBox, NULL, eax, NULL, NULL


The MessageBox should show you the dot notation of your client! I don't use GetPeerName because I like to store SocketAddr.sin_addr somewhere!

Otherwise show me the code you use and I'll take a look.
Posted on 2003-10-19 01:13:54 by SubEvil