|
-
January 1st, 2009, 04:38 AM
#1
C++ Server/Client application
Hello All
I am working on a server/client application. The client connects to the server and sends some request data to the server, the server receives this data, does some function call, prepare response data and sends the response data back to the client.
The client then receives the response data.
The connection is NOT closed then. The client may send another request and so on until the client close the connection.
Before any connection, the server is in blocking accept() call. If the client connects to the server, so a new thread is created and calls blocking recv() waiting for requests coming from the client.
The client uses a non blocking recv() with a timeout. (about 2 secs)
I run a test application that opens two connections with the server, and indefinitely send requests to the server and receive the response.
It works fine for a while (may be 5 mins, may be 15 mins) but eventually the recv() function of the client times out meaning that it coulding reseive the response data, although the server sends the response back
I dont know if the data is lost or send function of the server does not really send the data.
Any suggestions ?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|