Well I remember writing one a long time ago but I forgot how I looped to wait for a connection.... any ideas on how to do it?
Printable View
Well I remember writing one a long time ago but I forgot how I looped to wait for a connection.... any ideas on how to do it?
Open listening socket and assign a callback that will be called when incoming connection arrives?
Under Windows and using winsocks you can use a new thread and pass to it a 'copy' of the socket accepted; then on that new thread just call and recall the receive/send functions till you get the close instruction.
Hope that helps.
Niara