![]() |
| | #1 |
| Registered User Join Date: Dec 2004 Location: Brazil, Porto Alegre
Posts: 152
| Illegal Seek weird error! I have a strange error in my application. After many recv calls, the next call receives less bytes than sent by the client. For example, the client sends 70 bytes and the server receives 40 bytes. It is important to notice that, after the first call to recv is made, perror prints "Illegal Seek". But even with this error, the server receive all the bytes sent by the client in the first calls. We print perror before the recv and, before the first call, perror prints "Sucess" (probaly to a select call). Thanks any insight! |
| Mortissus is offline | |
| | #2 |
| and the hat of Jobseeking Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,676
| 'x' bytes sent in one send call does not guarantee that 'x' bytes will be in any single recv call. Without seeing code, who knows what you've done |
| Salem is offline | |
| | #3 |
| Registered User Join Date: Dec 2004 Location: Brazil, Porto Alegre
Posts: 152
| I understand. I have prepared the code to send in many chunks, as necessary. The Illegal Seek is still there, but I think it was my mistake to consider this as an error, since recv does not return -1, therefore not setting errno. I thought that could be poor kernel code, a system call inside recv that was not beeing handled. I was a fool to think that. Anyway! The code is now working, and the lesson is, even if the client can receive 500B in one chunk, does not means that the server can receive this amount in one chunk too. Thanks! |
| Mortissus is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Getting an error with OpenGL: collect2: ld returned 1 exit status | Lorgon Jortle | C++ Programming | 6 | 05-08-2009 08:18 PM |
| Testing some code, lots of errors... | Sparrowhawk | C Programming | 48 | 12-15-2008 04:09 AM |
| Another syntax error | caldeira | C Programming | 31 | 09-05-2008 01:01 AM |
| Problem with Visual C++ Object-Oriented Programming Book. | GameGenie | C++ Programming | 9 | 08-29-2005 11:21 PM |
| pointer to array of objects of struct | undisputed007 | C++ Programming | 12 | 03-02-2004 04:49 AM |