End Google Ads 201810 - BS.net 01 --> Hi,
I have a listening port and it should handle many number of clients at a time.

When i try with 10-25 clients in LAN, its work fine. My doubt is that will it be sucess when it upload to the web, where many number of users acess the server from diffrent part of the world.

Below code is used to listen as server. Please verify the code for multipe number of client, what will be the approximate limit of clients can connect?


strHostName = Dns.GetHostName();
IPHostEntry ipEntry = Dns.GetHostByName( strHostName );
aryLocalAddr = ipEntry.AddressList;

Socket s_listen = new Socket(AddressFamily.InterNetwork,SocketType.Stream, ProtocolType.Tcp);
s_listen.Bind(new IPEndPoint(aryLocalAddr[0], 400));
s_listen.Blocking = true;
s_listen.Listen(-1);
// Setup a callback to be notified of connection requests
s_listen.BeginAccept(new AsyncCallback(app.OnConnectRequest), s_listen);

-----
public void OnConnectRequest( IAsyncResult ar )
{
Socket lis = (Socket)ar.AsyncState;
NewCon( lis.EndAccept( ar ) );
lis.BeginAccept( new AsyncCallback( OnConnectRequest ), lis );
}


thankyou
YPKI