Hi everyone,
does anyone know how to get the remote host from a connected socket? When I get a FD_ACCEPT msg I want to print out the ip of the just connected remote host...is there any winsock api for that?

p.s.: in vb there is this nice thing...on ConnectionRequest -> Winsock1.RemoteHostIP... 8)

Dominik
Posted on 2004-09-09 00:13:48 by Dom
when using accept the sockaddr structure is filled with information about connecting server.




LOCAL sockadr:sockaddr

invoke accept, socket_handle, addr sockadr, sizeof sockadr

mov eax, sockadr.sin_addr ; now eax contains address in network byte order

Posted on 2004-09-09 04:33:28 by arafel
thx arafel, that's what i needed... 8)
Posted on 2004-09-09 08:34:07 by Dom