You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once a client has opened a batch, it MUST NOT send any messages that are not part of the batch, until it is closed (with BATCH -reference-tag).
so there is no way to send these safely with the current API; all the (*Connection).Send methods send individual IRC lines, so if you're using them to send the individual lines of a client batch, you risk interleaving it with responses sent asynchronously from handlers (e.g. the PING handler).
This isn't major surgery at the implementation level because pwrite already takes a []byte:
pwritechan []byte// receives IRC lines to be sent to the socket
Right now it's always used to send one line at a time, but there's nothing preventing us from concatenating multiple messages and pushing the concatenated message onto pwrite.
The text was updated successfully, but these errors were encountered:
https://ircv3.net/specs/extensions/client-batch says:
so there is no way to send these safely with the current API; all the
(*Connection).Send
methods send individual IRC lines, so if you're using them to send the individual lines of a client batch, you risk interleaving it with responses sent asynchronously from handlers (e.g. the PING handler).This isn't major surgery at the implementation level because
pwrite
already takes a[]byte
:irc-go/ircevent/irc_struct.go
Line 75 in 36a8aad
Right now it's always used to send one line at a time, but there's nothing preventing us from concatenating multiple messages and pushing the concatenated message onto
pwrite
.The text was updated successfully, but these errors were encountered: