Dear all,

I have an application derived mostly from the ICS's MtSrv example (I call it 
MySrv hereafter).  MySrv follows MtSrv in maintaining a listening socket in the 
main thread, and creating a new client thread when a new socket is connected.  
Client thread (socket) creation rate is around 5-10 per second in busy hours, 
total around 2000 in average every day.  Applications that request socket 
connection reside in the local machine, there is, some other processes.  MySrv 
has been running for more than two years without major problem.

Recently (in this month) the MySrv application crashed frequently.  Examining a 
log file the problem was mainly the requesting processes could not make 
connections to MySrv.  Unfortunately service from MySrv is very demanding I 
have no time to check the status every time when it failed, I have to restart 
it immediately to resume the service.  For this reason I got little information 
to debug.

I think of adding several lines of code to monitor the listening status of the 
TWSocket, in case it was not the code kicks start it to listen again.  This can 
help me to identify whether the problem is from the main thread.  Can anybody 
kindly advise how to implement this mechanism?

Thanks in advance.

Best regards,
To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to