[Ilugc] Doubts on Sockets

  • From: prashanth_viswanathan@xxxxxxxxxxx (Prashanth V)
  • Date: Fri, 20 Dec 2002 20:06:08 +0530

Hi,
I think it is better to use the write() call than the send() with TCP 
sockets, especially when you are sending structures. Invoke as
write(sockDescptr,(char*)&structure,sizeof(structure));

rgds,Prashanth

From: Prakash N <prakashnmurthy@xxxxxxxxx>
To: ilugc@xxxxxxxxxxxxxxxxxx
Subject: [Ilugc] Doubts on Sockets
Date: Mon, 16 Dec 2002 23:37:39 -0800 (PST)


Hi All,

I have a small doubt in Sockets..

We use sockets for sending data accross the processes.

I am using a TCP socket for such communication.

I need to send one structure using Sockets.

Now please let me know how can I write my structure into the buffer(one of 
the parameter of send System Call)

Please do reply

Prakash



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


Other related posts: