mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2006
Posts: 3,944
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,944
/sockopen -n was added to disable the nagle algorithm but if the socket comes from a listening socket, we cannot have the same effect, could it be added please?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jul 2006
Posts: 3,944
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,944
Sorry to be late about this, I saw socklisten -n was added, I had tested it but without really seeing any difference. I just noticed while trying to document it on wikichip that I made a mistake, sort of.

The sockets where it would be useful to disable the nagle algorithm are the socket created by /sockaccept, not the socket created by /socklisten, where no data are sent/received.

I'm not expert on the nagle algorithm bit at all, I have no idea if it's worth keeping a support for it in /socklisten, but at least /sockaccept would need to support it.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,169
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,169
Technically, accept() sockets should inherit some properties from the listen() socket although that may depend on the operating system. Another potential issue is that some setsockopt() options usually need to be set prior to other socket-related calls, otherwise they won't be set. I have made a change to the next beta so that the accept socket itself is changed the moment it is accepted and that seems to be working.

Joined: Jul 2006
Posts: 3,944
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,944
Thanks for looking into it.

I take it the -n switch of /socklisten will still be how you enable the feature, making it so that if enabled, it's enabled for all accepted socket, with no way to select which accepted socket has the feature enabled? That should be fine in most cases, and for me anyway, but... why limit it, wouldn't it better to allow it per accepted socket? Or was it intended from you to limit/make it that way? This implicit suggestion would require a $sock().nagle property to work, but that property would still be great to have if the design stay the same


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,169
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,169
I have changed this to work for both "/socklisten -n" and "/sockaccept -n". If /socklisten -n is used, accepted sockets will inherit the -n automatically. If /socklisten -n is not used, accepted sockets can use /sockaccept -n individually.

Joined: Jul 2006
Posts: 3,944
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,944
Perfect, thanks.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard