Full data in socket

5 pts.
Tags:
C socket
Flex socket
Server configuration
Servers
Socket
Socket programming
Hello, I have a C server and flex client.  Server sends data to client depending upon the commands sent by the client.  For example, if the commad is 1 the server would read a file and send the content to the file, if the command is 2 then it would read another file and send the contents to the server, every file is marked by character 'EOF' to indicate the end of the data.  I observed that the client is not getting all the data every time.  It some times getting data fully and some times not - this happens when the data is big about huge.  I tried checking for the EOF by reading byte by byte it is becoming impracticle as this takes processing time.  Can someone give me some solution/code snippet in flex that would solve my problem? Thanks

Software/Hardware used:
Software
ASKED: July 3, 2010  1:18 PM
UPDATED: July 6, 2010  12:01 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    What was the result when you tried checking for the EOF by reading byte by byte ? were you able to receive the complete message ? The problem could not be the detection of the EOF, as this wouldn't cause data lost but would probably make the client keep trying to read data from the socket. On the other hand, when the server sends the data, the send function should return the number of bytes sent. Is the server getting the correct number of bytes sent ? I would try sending the data in chunks to see if that makes any difference. I can't provide flex code as I've never used flex.
    65,110 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following