A question regarding sockets

For issues with communication ports, protocols, etc.
Post Reply
dani.user
Posts: 284
Joined: Sep 30, 2006 10:41

A question regarding sockets

Post by dani.user »

Hello

How can I configure a tcp socket so that, when sending data through it, the program should not wait until all the data is received by the other end?

Thank you
maddogg6
Posts: 824
Joined: Dec 07, 2005 22:58
Contact:

Post by maddogg6 »

use threads??? - I dunno - I dummm.
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

Your app sending the information shouldn't halt unless the network becomes overly saturated with the packets you are sending, afaik.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: A question regarding sockets

Post by caseih »

dani.user wrote:Hello

How can I configure a tcp socket so that, when sending data through it, the program should not wait until all the data is received by the other end?

Thank you
Either threaded loops that wait on the socket or asynchronous I/O are the recommended techniques. In Linux, for example, I could use the "select" system call to wait for data on any number of sockets simultaneously and then dispatch to a handling function. Windows has a similar api, called "WaitForMultipleObjects".
dani.user
Posts: 284
Joined: Sep 30, 2006 10:41

Post by dani.user »

Ok.

Thanks
Post Reply