mIRC Home    About    Download    Register    News    Help

Print Thread
#80164 21/04/04 10:03 PM
Joined: Oct 2003
Posts: 13
Eistee Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Oct 2003
Posts: 13
the help says: The sockwrite event is triggered when mIRC has finished sending all of the info which you previously queued for sending.

but if i check $sock($sockname).sq inside this event it is not 0 so i get an buffer overflow.

Confused

#80165 27/04/04 09:59 AM
Joined: Feb 2003
Posts: 307
T
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 307
hello
<the help says: The sockwrite event is triggered when mIRC has finished sending all of the info which you previously queued for sending.

It means it sent some data, not all.

You must make sure that $sock($sockname).sq <= 16k (top!!!!)
I recommend 8k value so when you are testing and it fails, case you are sending 4 or 8k bytes packets, it means that you always have less or equal than 16k.
You must make this test before you try to send something to the socket, if the test fails you only have to return the event. Next time the event is called you will have more space in the socket buffer to send.

Hope this helps

#80166 27/04/04 08:58 PM
Joined: Oct 2003
Posts: 13
Eistee Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Oct 2003
Posts: 13
mIRC has finished sending all of the info which you previously queued for sending

sending a part of the buffer is not sending all.
so i think this is a bug in the help file or the event did not work korrektly

#80167 27/04/04 09:05 PM
Joined: Feb 2003
Posts: 307
T
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 307
In that case, yes there is a bug in the help file since i belive the way the event is working is the most efective.

Tontito


Link Copied to Clipboard