Hi,
I'm converting socket reading program written in delphi into livecode using following syntax.
read from socket for read_bytes chars with message 'pkt_read'
When read_bytes is less than 20k there's no delay reading socket data.
But when read_bytes is about 35k the livecode program waits about 5 or more seconds to read socket data.
And at that moment, livecode sends lots of socketTimeout event. I set socketTimeoutInterval to 1000.
And on server side, sending program also waits to flush.
This means livecode program doesn't clear socket buffer after a read.
( I made test delphi program for this. When client doen't read socket buffer, server program waits for some time to flush )
Is there a way to set socket buffer size ?
Or is this a bug which is to be fixed ?
socket buffer related problem
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: socket buffer related problem
A message from 2005, with (apparently) the same issue (LiveCode list)
http://lists.runrev.com/pipermail/use-l ... 52864.html
Which version of LiveCode do you use ?
http://lists.runrev.com/pipermail/use-l ... 52864.html
Which version of LiveCode do you use ?
Re: socket buffer related problem
note that socket timeout is sent periodically, and has nothing to do with actual timing out or not. Basically if there's no traffik, socket timeout is to be expected.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: socket buffer related problem
That's a *very* short timeout interval. You will probably want to increase it to something more than one second. 35k bytes is a lot of packets - no doubt you're hitting timeouts before getting to the end.
Re: socket buffer related problem
Thanks for the replies.
I'm using Livecode 4.6.
And I know timeout is natural for socket handleing but in my case it takse to much time to read data.
And in case of delphi program it's a snap to read whole packet.
As I said before, when timeout happens, on server side sending program cannot flush socket buffer becase of client side buffer is not cleared.
I'm using Livecode 4.6.
And I know timeout is natural for socket handleing but in my case it takse to much time to read data.
And in case of delphi program it's a snap to read whole packet.
As I said before, when timeout happens, on server side sending program cannot flush socket buffer becase of client side buffer is not cleared.