MULTITHREADED
- From: "aston" <rajesh.rc@xxxxxxxxx>
- Date: 8 May 2006 19:54:01 -0700
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.
.
- Follow-Ups:
- Re: MULTITHREADED
- From: Joe Seigh
- Re: MULTITHREADED
- Prev by Date: Re: when multiple threads are waiting on a mutex, which one will acquire the lock first?
- Next by Date: Re: when multiple threads are waiting on a mutex, which one will acquire the lock first?
- Previous by thread: RFC - New Object-Oriented Method of Parallel Programming
- Next by thread: Re: MULTITHREADED
- Index(es):
Relevant Pages
|