|
Original Message of Kerry
----------------------------------------
I took a look your code, and found your locking is in low performance.
And you'd better enable SuperWebSocket's logging becuase it is very helpful for debuging.
1) LogUtil.Setup() in your code entrance;
2) /Config/log4net.config
I think you'd better design a client driven heat beat and enable clear idle session function of SuperSocket. Then, you needn't foreach all sessions.
BTW, I suggest you handle request by sub protocol ways.
---------------------------------------
Thanks Kerry,
I'm currently websocket4net based .net console clients.
But the client software were already distributed and can not be updated at this moment.
So it's hard to make client-side heart beating.
But each clients could try reconnect after closing connection.
Anyway, I have to continue server-side heart beating at this moment.
So my questions are:
1. In this case, the clear idle session function is still effective to clear some zombie sessions?
2. What is the ideal heartbeat interval to keep web socket clients sessions?
I'm using 20 seconds and I think It's too frequent.
Thanks for your kind help.
|