MULTITHREADED



I built the multithreaded server, where each client request are handle
by the one of the idle thread in the pool. The thread is passed a
connected socket return by accept function. The thread job is to open
the new socket to the particular IP and PORT, let say X. Each client
request are passed to this thread's socket and this socket requested
the data from the X server and the data recieved by the thread socket
is passed to the client. So it is like working as a middle layer
between the web -browser and original server.The socket open by the
thread should have setsocket option , SO_KEEPALIVE. And this socket
should not be closed (like making persistent connection). After work is
finished by the thread , the thread status is changed idle again and
other client request uses this idle thread.....whixh already have
connected socket to the X server..

My problem is,

1. X Server close the connection without passing all the requested data
and i get uncomplete html files...... I have used thread safe recv and
send function.

2. I don't know how to make persistent connection. I used setsockopt
function......

with regards

aston.

.



Relevant Pages

  • RE: problem WebRequest and WebResponse
    ... HttpWebRequest request = ... WebResponse response = null; ... System.Net.Sockets.SocketException: A connection attempt failed ... connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Asynchronous socket performance problem
    ... Why are you closing the socket after handling the request? ... your client is expecting that once a connection is made that it will be there ...
    (microsoft.public.dotnet.framework.performance)
  • Re: Socket Pools?
    ... Get the users to use a UDP Port to request a Connection, ... > I want users of this class to be able to request a socket and if one isn't ...
    (microsoft.public.dotnet.languages.csharp)
  • Sockets - whats the best way to do this?
    ... I have an application that listens on a socket using TcpListener. ... AcceptSocket method like I've used, but just before the connection request ...
    (microsoft.public.dotnet.general)
  • IE6 bug: doesnt resend form-data when server resets connection
    ... When the server closes the connection on a socket where IE is currently ... sends the request on an existing socket and the server immediately replies ...
    (microsoft.public.windows.inetexplorer.ie6.browser)