RbCafe

RealBasic Complete Socket

Posted in Codex by RbCafe on the October 27th, 2005

OBSOLETE

Obsolete Workaround One: In previous versions of REALbasic, you could speed up your send process by a fair amount by “tickling” the socket with a timer. You would do this by having a timer say Socket.Poll in its Action event while the socket was doing a send. This trick should no longer be needed, though it isn’t detrimental to leave it in. Sockets now internally keep track of the fact that they have more data to send, and are in a tighter send loop. Once the data has finished sending, the socket no longer takes up as much processor time.

In old applications that I have come across, I have seen calls to Socket.Poll strewn throughout Socket event handlers. These calls are not necessary. The Poll method is used to allow RB to fire events to you, as well as update internal data structures. Since you are already in an event, then calling Poll might cause reentrancy issues. You should only call Poll if you are in a tight loop and need to give RB some time to update its internals.

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13


Leave a Reply

You must be logged in to post a comment.