Re: data not arriving at client (bsd-sockets)
Re: data not arriving at client (bsd-sockets)
- Subject: Re: data not arriving at client (bsd-sockets)
- From: Robert Kuilman <email@hidden>
- Date: Sun, 18 May 2003 17:49:06 +0200
Hey Chilton,
The buffer_size is the size of the structure. the structure is:
struct My_Packet {
char command;
char data[2047];
};
they are identical in both applications, and debug output from the
server application shows it sent me 2048 bytes. so the 'problem' i
figure should be at
my side, since the data (the same struct) i am sending to the server is
arriving just fine.
The second call is producing the right struct indeed. The data matches
perfectly.
Robert K.
web:
http://halfduplex.net/
email: email@hidden
On Sunday, May 18, 2003, at 05:32 PM, Chilton Webb wrote:
Hi Robert,
Well, does the second call to read actually produce the right struct?
What are you passing in as buffer_size (the amount you expect to > read)?
Also, can you post more of your code? There's not much to go on here.
-Chilotn
On Sunday, May 18, 2003, at 10:16 AM, Robert Kuilman wrote:
the code i use for receiving data is as follows.
bzero(buffer, buffer_size);
bytes_read = read(mySocket, buffer, buffer_size );
bytes_read inidicates says it received 2048 bytes (size of my struct)
but there's simply nothing in there!
the second time i call this code, it does receive data...
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.