471,337 Members | 1,098 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

Async Socket Issue

Hello all, I am hoping someone could point me in the right direction.

I am working on a project that requires my client socket to maintain an
active connection and reply to information form my server at long intervals.
The server "pings" the client on a regular basis when there has been no
activity in order to ascertain whether or not the connection is still active.
it sends the client a particular bit of information and waits for a
specified reply. If it does not receive that reply, it shuts its end of the
connection down.

The communication looks a bit like this: client connects, client sends some
identifying information to the server, after a period of time server sends
"ping" request to client, client responds with expected reply.

Except that I cannot, under any circumstances using the .NET socket
implementation, get this to work. The client and server can communicate fine
as long as the client had just sent information to the server. If, for
example, I want to send information to the server that communication works
fine -- but when the next time the server needs to "ping" the application,
the client does not seem to receive the communication.

I have tried async sockets, the Select function and the Poll function. For
testing, I have a very stripped down application -- it all runs in one
thread, and, in the case of the Poll and Select methodologies, the calls are
made within a while loop running in the main() function. I have verified
that the "pings" are being sent from the server, and I have encountered this
error with other languages (C and PERL).

For a variety of reasons related to the project requirements, I would prefer
to use C# for this code. Does anyone have any idea what I could be doing

Jul 21 '05 #1
0 857

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by MuZZy | last post: by
6 posts views Thread by Shak | last post: by
7 posts views Thread by Shak | last post: by
4 posts views Thread by nyhetsgrupper | last post: by
1 post views Thread by rockdale | last post: by
11 posts views Thread by atlaste | last post: by
10 posts views Thread by ColoradoGeiger | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.