mIRC Home    About    Download    Register    News    Help

Print Thread
#203373 13/08/08 04:52 AM
Joined: Mar 2007
Posts: 40
S
silimon Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2007
Posts: 40
Quote:
Note: If you try to /sockwrite while there is still info queued in the send buffer, your new info will just be added to the end of the queue up to a maximum of 16384 bytes. Any attempt to queue more than that will result in an error message, so you should check how much info is currently queued by using $sock().sq (send queue) before trying to queue info on a socket.


I've taken this to mean that you can only write 16384 bytes on a socket at any given time and in the past I've worked carefully to avoid an error from queueing more than the limit. However, I recently wrote a script that wrote more than this in one sockwrite command by accident, quite a bit more in some cases -- and without error.

Is this/was it the limit? Am I intepreting this wrong?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This limit, along with quite a few others that have been accidentally found, may have been increased when Khaled increased the buffer size (or whatever the proper term for it is) that now allows variables to hit roughly 4000 characters compared to the previous limit of roughly 900 characters.

Joined: Mar 2007
Posts: 40
S
silimon Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2007
Posts: 40
What's the new limit?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
No idea.. suggest you experiment, as the help file still shows the 16384 mark... and as I said, it may have been increased.

Joined: Mar 2007
Posts: 40
S
silimon Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2007
Posts: 40
i'm really hesitant to do anything with it--testing or not.

think i'll leave it at 16384 until there's at least a documented change.

Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
Just to make sure, did $sock().sq return a value higher than 16384 in those cases, too? Underlying mIRC's send queue is another send queue in winsock, so that some data you write might never end up in mIRC's send queue.

What the helpfile means, is that you can write to the socket until $sock().sq hits 16384. This might not be after writing 16384 bytes to the socket.


Saturn, QuakeNet staff

Link Copied to Clipboard