Quick sockets question

V

Vasyl Smirnov

Hi,

I wonder if it is sufficient to use read/write methods on a TCP/
UNIXSocket object if all I need to do is just send
the data to and fro?

Does it handle partial reads/write situations internally?

As far as I understand, recvfrom is necessary when you need some
specific stuff, like out-of-band data?

Confused, because Pickaxe examples use recvfrom(), and not read().

Can someone explain?

Thanks.
 
R

Robert Klemme

2007/10/23 said:
Hi,

I wonder if it is sufficient to use read/write methods on a TCP/
UNIXSocket object if all I need to do is just send
the data to and fro?

Does it handle partial reads/write situations internally?

As far as I understand, recvfrom is necessary when you need some
specific stuff, like out-of-band data?

Confused, because Pickaxe examples use recvfrom(), and not read().

Can someone explain?

Off the top of my head I believe #recvfrom is for UDP while you want
to do TCP. And yes, #write and #read should be sufficient.

Kind regards

robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top