Greetings,
Can someone let me in on the basic code to listen with the winsock ocx on a socket, accept the connection, create a new winsock control that will then go back to listening on the same port?
Thanks
Printable View
Greetings,
Can someone let me in on the basic code to listen with the winsock ocx on a socket, accept the connection, create a new winsock control that will then go back to listening on the same port?
Thanks
See the MSDN page Using the Winsock Control.
If you need to send/receive record type structures, let me know. There are some important issues that you need to be aware of.
If you need help write back
Well, i just really want to know how to generate a new control 'on the fly' in code.
your listening sock should have a index of (0)
dim NextSock as integer
sock(0).listen
in the sock connect_request
NextSock=NextSock+1
load sock(NextSock)
sock(NextSock).Accept RequestID
the listening sock's state is never changed the connection requests are accepted on new socks
CAPHS wrote:Did you look at the MSDN page? What you want is described there. With code examples.Quote:
Well, i just really want to know how to generate a new control 'on the fly' in code.