G
Guest
I am programming a asyncronous server with .NET using ThreadPool..
Basicly Client connected to server using TCP sockets
When I test the program until 25 client server can respond all clients.but
after 25. client connected server cant respond other clients!where is the
problem?
when a client connected i want to check socket if data avaible..
ThreadPool.QueueUserWorkItem(new WaitCallback(CheckSocket),_socket);
.....
the CheckSocket callback:
private void CheckSocket(object state)
{
while(_connected)
{
if(_socket.Poll(-1, SelectMode.SelectRead))
{
if(_socket.Connected)
{
....
}
}
}
Basicly Client connected to server using TCP sockets
When I test the program until 25 client server can respond all clients.but
after 25. client connected server cant respond other clients!where is the
problem?
when a client connected i want to check socket if data avaible..
ThreadPool.QueueUserWorkItem(new WaitCallback(CheckSocket),_socket);
.....
the CheckSocket callback:
private void CheckSocket(object state)
{
while(_connected)
{
if(_socket.Poll(-1, SelectMode.SelectRead))
{
if(_socket.Connected)
{
....
}
}
}