We have socketserver that was developed using SocketAyncEvent Args based loosely on based loosely on the MS sample at http://msdn.microsoft.com/en-us/libr...eventargs.aspx
Recently we had an issue with the socket server , it is not accepting new connections at all.But after restarting the service it worked.It is happenning frequently.
When I looked into the logs , I see lot of connection...
User Profile
Collapse
-
How to handle socket error connection reset
-
tried adding gc.collect() twice , but didn't work
thanks
zoho -
Yep, I am disposing sockets first and then ssl stream.I tried using tcpClient.getSt ream too instead of socket stream , still no luck.
I will try adding GC.Collect();tw ice and see what happens.
ThanksLeave a comment:
-
The code I mentioned is only for Disconnect.The disconnect function is being called in read and write operations whenever there is IO xceptionsor clients are being diconnected.
After disconnect I ran netstat command , I don;t see any connections.
ThanksLeave a comment:
-
socket server memory is keep on increasing
Hi,
We have socket server which is developed in c# .net 3.5.
I see server memory keep on increasing whenver client disconnectes and connects.The server disconnects client if client didn;t send valid credentials.
When client is trying to connect with invalid credentials the memory is keep on increasing.
Here is the code that handles disconnection.
...Code:try { -
sslstrea.dispose() functionality
Hi
I use networkstream with sockets in sslsteam socket server using c# like
stream = new NetworkStream(s ocket, true); sslstream=new SslStream(strea m, false);
My question is , if when call sslstream.dispo se() , will it dispose/close its inner stream and its socket too? Or Do I need to explicitly close all three resources sslstream.close ,stream.close and socket.close?
Thanks
zoho -
-
Here is the code to accept the connections
...Code:public void Start(int Port) { IPEndPoint localEndPoint = new IPEndPoint(IPAddress.Any, Port); // create the listener which listens for incoming connections listener = new TcpListener(localEndPoint); listener.Start(); //Accept connections asynchronously listener.BeginAcceptSocket(acceptCallBack,Leave a comment:
-
Scalable SSL socket server
HI,
I have developed C# socket server using SSLStream . I followed MSDN examples on developing it. I am having few issues
1.The memory keep on increasing on more number of clients connected.
2.It is not accepting new clients after sometime, may be after few days, eventhough already connected clients are sending and receiving data.
When I do netstat -a , I see tcplistener is listening at port but when I do telenet...
No activity results to display
Show More
Leave a comment: