From your OnSessionAvailable, you call Accept on behalf on the
listening socket. You get the socket handle.
Then you call WSocket_getsockname to get the remote IP/Port.
Thanks, all working now. Also needed WSocket_closesocket to close
connections I want to ignore.
I did look on the
I did look on the 'wiki' page and the old help pages, but none of these
WSocket_xx functions are outlined or documented.
There are still a lot of things missing.
There should be a chapter for the units. WSocket_xx functions are just plain
functions, not component methods. So they belongs to
Can I get the IP address of an incoming TCP/IP session
before accepting it, so I can ignore it?
You can't.
You have to accept the incomming connection, get the remote IP and
then, if you decide to, abort it.
OK, so I accept the connection into a temporary TWSocket, get the IP
address
OK, so I accept the connection into a temporary TWSocket, get the IP
address and then decide which permanent TWSocket I want to use and Dup
the handle. How do I then 'undup' the handle so I can free the
temporary socket without closing the connection?
This application listens on multiple
Hello Angus,
Can you explain why you need to so ? Why dup ? Just for me to
understand if you usage may be one I may need sometime.
Can I get the IP address of an incoming TCP/IP session
before accepting it, so I can ignore it?
You can't.
You have to accept the incomming connection, get
Can you explain why you need to so ? Why dup ? Just for me to
understand if you usage may be one I may need sometime.
Dup is what you do whenever you accept an incoming connection on a
listening socket, passing it to the client socket.
TCP clients sockets are usually dynamic, but in this
Can I get the IP address of an incoming TCP/IP session before accepting
it, so I can ignore it?
ListenSocket.sin.sin_addr.S_addr seems to give it sometimes, but
probably only because it's remembered the previous session.
Angus
--
To unsubscribe or change your settings for TWSocket mailing
Can I get the IP address of an incoming TCP/IP session
before accepting it, so I can ignore it?
You can't.
You have to accept the incomming connection, get the remote IP and then, if
you decide to, abort it.
--
[EMAIL PROTECTED]
http://www.overbyte.be
--
To unsubscribe or change your