What's wrong with this socket handling (receive blocks send)

L

Laura T.

Hi,

I've this kind a program, using sockets to communicate with the clients. One
of the clients can be a web browser (like IE).
When using IE as a client, the transmission blocks completely, and IE times
out after a long time while stating opening from http://localhost:7765...

I have a main thread that starts TCPListener and listens and accepts the
connection and queues a worker thread to handle the socket transmission:

loop
..
..
try
{
socket=_mainlistener.AcceptSocket();
ThreadPool.QueueUserWorkItem(<proc>,socket)

}
catch()
..
..
end loop

The worker thread starts with Receive and then sends a response and loops
over it until the socket is connected:

<init worker thread>
..
..
while(socket.Connected)
{
socket.Receive(buf,0,768,0);
 
L

Laura T.

Some missing details, the connection is TCP, the .NET framework is 1.1Sp1
and OS is Win2kSp4.

Laura
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top