mfisc...@bfe.tv wrote:
 
>> Have you already tried to include wsoNoReceiveLoop in client objects'
>> ComponentOptions? Also are those large amount of socket messages sent
>> in a blocking loop? If so, change that to send the next message when
>> the previous one actually has been sent, that is when event
>> OnDataSent triggers.
> 
> I already use wsoNoReceiveLoop in the ComponentOptions.
> The problem is indeed that the large amount of socket messages is
> send in a blocking loop.
> Your proposal would be a appropriate work around, but i think this
> will slow down the communication.

I don't think so, not realy. It would however retrieve (other) 
messages from the queue if any, hence give all clients a chance to
do some work as well, would just lead to better load balancing. 
Lengthy blocking tasks should be avoided as much as possible since
by default the listening socket and all clients share the same 
thread.
 
>> 
>>> Sometimes it happens, that in the Server the OnDataAvaiable-Callback
>>> stops to be triggered.
>>> If i call receive(nil,0) on the affected socket, everything gets
>>> back working correctly.
>>> In my opinion some postmessage-calls in the socket are discarded
>>> because the windows message queue for the server process is full.
>>> If i set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
>>> NT\CurrentVersion \Windows\USERPostMessageLimit to Value of 50.000
>>> Everything seems to be working fine.
>> 
>> IMO TWSocket should be changed to raise an Exception if a call to
>> PostMessage() fails, currently it doesn't check the PostMessage()
>> return value.
> 
> This would be as suitable solution, especially for environments with
> more than 10.000 Client.

IMO it would be just useful for debugging purposes, warning the 
developer that the application design should be revised. One cannot 
resolve this error condition without calling the message pump, which
may lead to other odd behavior.

-- 
Arno Garrels 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to