Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendMessage(...) chunked sends when over 512 bytes #8

Open
deavmi opened this issue Mar 14, 2023 · 0 comments
Open

sendMessage(...) chunked sends when over 512 bytes #8

deavmi opened this issue Mar 14, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@deavmi
Copy link
Owner

deavmi commented Mar 14, 2023

Check the size of the message (header included) before sending over socket and then perform message split.

Notes from @rany2

<rany> You're doing 
<rany>   PRIVMSG deavmi abcdefe
<rany>    PRIVMSG deavmi fgh
<rany>  
<rany> well that'sd what you need to do 
<rany> if you did this in sendMessage/encodeMessage
<deavmiLaptop> `  PRIVMSG deavmi abcdefe`
<rany> it will do:
<rany> PRIVMSG deavmi abcdefe
<rany> fgh
<deavmiLaptop> is the spacing intentional here?
<rany> no, just formatting
<deavmiLaptop> PRIVMSG deavmi fgh
<deavmiLaptop> ah
<rany> fgh isn't an irc command so it won't go trhy
<deavmiLaptop> Yes
<rany> thru*
<deavmiLaptop> so wait
<deavmiLaptop> Let's say 6 was maxlen
<deavmiLaptop> then privateMessage("Hellon")
<deavmiLaptop> should effectievly split into:
<deavmiLaptop> PRIVMSG deavmi Hello
<deavmiLaptop> PRIVMSG deavmi n
<rany> yep
<deavmiLaptop> is what you are saying
<deavmiLaptop> ah
<deavmiLaptop> I get why you are saying now
<deavmiLaptop> It needs command awareness then
<rany> the limit isn't in message size
<rany> but IRC command size
<deavmiLaptop> Like sendMessage()
<deavmiLaptop> rany, yes sorry
<deavmiLaptop> I meant then max irc command ended at the o
<deavmiLaptop> of hello
<deavmiLaptop> just for the sake of the example
<rany> so PRIVMSG and channel message have didferent max sizes
<deavmiLaptop> Yes
<deavmiLaptop> that makes sense
<rany> because the commadn to run a private message and channel message is diff
<deavmiLaptop> aight, oki doki
<rany> and even among the same type 
<rany> the user might have a long nick 
<deavmiLaptop> Can i copy this log into the github issue?
<rany> ys
<deavmiLaptop> for ref?
<deavmiLaptop> thanks
<rany> yes*

Notes 2

<rany> deavmiLaptop: in short you need to first take length of `PRIVMSG <<nick>>` 
<deavmiLaptop> Yes
<rany> and then get the maximum IRC command size if negotiated by IRC server
<rany> or use RFC's limit
<rany> then do your calc based on that
@deavmi deavmi added the enhancement New feature or request label Mar 14, 2023
@deavmi deavmi self-assigned this Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant