Re: [twsocket] USERPostMessageLimit

2012-03-14 Thread MFischer
twsocket-boun...@elists.org schrieb am 08.03.2012 15:12:18:

 [Bild entfernt]

 Re: [twsocket] USERPostMessageLimit

 Arno Garrels

 an:

 ICS support mailing

 08.03.2012 15:12

 Gesendet von:

 twsocket-boun...@elists.org

 Bitte Antwort an ICS support mailing

 mfisc...@bfe.tv wrote:
  Hi,
  i am using the Standard TWSocket in a Server and round about 70
  Clients. After a Client is connected to the Server, the Client starts
  immediately to send string messages. After some sort of filtering the
  messages are broadcasted to a subset of all connected Clients.
  Especially at start up some clients send up to 10.000 messages with
  an average size of 40 bytes.

 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.


  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.

Regards,
 M. Fischer


 --
 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
--
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


[twsocket] USERPostMessageLimit

2012-03-08 Thread MFischer

Hi,
i am using the Standard TWSocket in a Server and round about 70 Clients.
After a Client is connected to the Server, the Client starts
immediately to send string messages. After some sort of filtering the messages
are broadcasted to a subset of all connected Clients.
Especially at start up some clients send up to 10.000 messages with an average
size of 40 bytes.
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.
What possibilities do i have if the system and so the number of messages
grows? Enlarging USERPostMessageLimit doesn't seem to be the right solution.

Thanks,
 M. Fischer
--
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


[twsocket] Antwort: Re: OnDataAvailable

2012-02-01 Thread MFischer
I'm not using LineMode. But my problem is solved.
I trapped myself by wrapping FSocket.Receive() into a if-block.

Thanks anyway.

  If the ClientSocket is closed, the callback for OnDataAvailable is
  triggered and the missing Bytes are received.

 This is the common sympton of missing line endings so the event is never
 called.  But this would not explain why it's suddenly happening.

 I gave up on LineMode a long time ago, and now build lines myself with a
 timeout so a partial line is processed after x seconds.

 Angus

 --
 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
--
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


Re: [twsocket] TWSocket OnSessionAvailable problem

2011-07-21 Thread MFischer

Hello,

i don't think that this could be the problem, because on netstat -a are no
sockets in TIME_WAIT related to the server process. And all client-sockets are
in state Established, the only matter is the in the server component the
OnSessionAvaiable-Callback is not called.

 twsocket-boun...@elists.org schrieb am 20.07.2011 17:16:30:
 Re: [twsocket] TWSocket OnSessionAvailable problem
 Wilfried Mestdagh
 an:
 'ICS support mailing'
 20.07.2011 17:18
 Gesendet von:
 twsocket-boun...@elists.org

 Hi,

 Maybe too many sockets in TIME_WAIT? You can chech this with netstat -a

 --
 mvg, Wilfried
 http://www.mestdagh.biz
 http://www.comfortsoftware.be
 http://www.expertsoftware.be


  -Oorspronkelijk bericht-
  Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
  Namens mfisc...@bfe.tv
  Verzonden: woensdag 20 juli 2011 11:44
  Aan: twsocket@elists.org
  Onderwerp: [twsocket] TWSocket OnSessionAvailable problem
 
 
 
  Hi,
  i am using the Standard TWSocket in a Server and round about 30 Clients
  in
  LineMode. After a Client is connected to the Server, the Client starts
  immediately to send text messages. After some sort of filtering the
  messages
  are broadcasted to a subset of all connected Clients. If i start the
  sever and
  30 clients through a script on a single Windows 7 PC the following
  error
  occurs: After 23-26 Clients get connected, the server no longer calls
  the
  callback function for OnSessionAvailable, but at client-side the
  callback for
  OnSessionConnected is still activated and the ClientSocket stays in
  state
  wsConnected. If i look at TCPView the corresponding Connection has the
  state
  Established. OnError or OnBGException are not called and the Socket
  is still
  in listening-State. If the Listening  Socket is Destroyed and
  recreated
  everything works in a certain way. Any idea in which direction my
  problem
  could be located?
  Thanks,
   M. Fischer
  --
  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

 --
 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
--
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


Re: [twsocket] TWSocket OnSessionAvailable problem

2011-07-21 Thread MFischer
I tried although the TWSocketServer Component and encountered the same
problem.
Same with different Versions of ICS. i have tried with an older version and
ICS-V6 from overbyte.be with Delphi 2006.
Maybe i should try with ICS-V7?


 twsocket-boun...@elists.org schrieb am 20.07.2011 18:27:56:
 Re: [twsocket] TWSocket OnSessionAvailable problem
 Arno Garrels
 an:
 ICS support mailing
 20.07.2011 18:28
 Gesendet von:
 twsocket-boun...@elists.org

 mfisc...@bfe.tv wrote:
  Hi,
  i am using the Standard TWSocket in a Server and round about 30
  Clients in LineMode. After a Client is connected to the Server, the
  Client starts immediately to send text messages. After some sort of
  filtering the messages are broadcasted to a subset of all connected
  Clients. If i start the sever and 30 clients through a script on a
  single Windows 7 PC the following error occurs: After 23-26 Clients
  get connected, the server no longer calls the callback function for
  OnSessionAvailable, but at client-side the callback for
  OnSessionConnected is still activated and the ClientSocket stays in
  state wsConnected. If i look at TCPView the corresponding Connection
  has the state Established. OnError or OnBGException are not called
  and the Socket is still in listening-State. If the Listening
  Socket is Destroyed and recreated everything works in a certain way.
  Any idea in which direction my problem could be located?

 Don't you use the TWSocketServer component?
 What version of ICS do you use and where did you download it?

 --
 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
--
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


[twsocket] Antwort: Re: TWSocket OnSessionAvailable problem

2011-07-21 Thread MFischer
 twsocket-boun...@elists.org schrieb am 21.07.2011 09:44:43:
 Re: [twsocket] TWSocket OnSessionAvailable problem
 Arno Garrels
 an:
 ICS support mailing
 21.07.2011 09:45
 Gesendet von:
 twsocket-boun...@elists.org

 Yes, please use ICSv7 and if possible TWSocketServer.
 Then try to include wsoNoReceiveLoop in the ComponentOptions
 of the TWSocketClient instances. Also try to assign a greater
 value to property ListenBackLog of the TWSocketServer component.

 And of course avoid any lengthy blocking tasks since they also
 delay/block acceptance of new connections (though buffered by
 winsock thru the ListenBackLogQueue).

 Did that work?

With ICSv7 and wsoNoReceiveLoop ComponentOption set, all my problems are
solved.
Thanks a lot especially for the very fast answers.
--
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


[twsocket] TWSocket OnSessionAvailable problem

2011-07-20 Thread MFischer


Hi,
i am using the Standard TWSocket in a Server and round about 30 Clients in
LineMode. After a Client is connected to the Server, the Client starts
immediately to send text messages. After some sort of filtering the messages
are broadcasted to a subset of all connected Clients. If i start the sever and
30 clients through a script on a single Windows 7 PC the following error
occurs: After 23-26 Clients get connected, the server no longer calls the
callback function for OnSessionAvailable, but at client-side the callback for
OnSessionConnected is still activated and the ClientSocket stays in state
wsConnected. If i look at TCPView the corresponding Connection has the state
Established. OnError or OnBGException are not called and the Socket is still
in listening-State. If the Listening  Socket is Destroyed and recreated
everything works in a certain way. Any idea in which direction my problem
could be located?
Thanks,
 M. Fischer
--
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