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
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
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
thx arafel, that's what i needed... 8)