Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Reading data from socket c++
Name: Pavel Date: August 16, 2003 at 05:36:14 Pacific OS: WinNT CPU/Ram: pentium 3
Comment:
This is the code: int ret; char buffer[1024]; memset(buffer, 0, sizeof (buffer)); ret = recv(theSocket, buffer, sizeof(buffer), 0);
Sometime i read all data from socket queue and sometime the recv function read only one byte and leave bytes in socket queue.
Why ??? How always read all data from socket queue ?
Name: micah Date: August 16, 2003 at 23:38:44 Pacific
Reply:
Thats because your computer has not recieved all the data so it cant be in the sockets buffer. What you can do is set the socket to non-blocking then loop the recv() until you have all the data. If you cant figure it out I can get you some code later.
Summary: Hi, this might be a strange question, but here goes anyway. I was wondering how sound recording / playback applications such as Audacity or Windows Media Player can record data to a file, and also ho...
Summary: The procedure we have used to read data from the memory card is as follows: SCARD_T0_COMMAND ib; \\structure defined in winsmcrd.h LPSCARD_T0_REQUEST tt; \\structure defined in winsmcrd.h DWOR...
Summary: i have developed an application that will send email i am using Visual Basic 2005 problem is that when i try to send email i am getting following error: "Unable to read data from the transport connect...