WICG / direct-sockets

Direct Sockets API for the web platform
Other
355 stars 14 forks source link

keepAliveDelay setting: milliseconds vs boolean #54

Closed vapier closed 1 year ago

vapier commented 2 years ago

the TCP constructor defines keepAliveDelay as so:

https://wicg.github.io/direct-sockets/#tcpsocketoptions-dictionary keepAliveDelay member Enables TCP Keep-Alive by setting SO_KEEPALIVE option on the socket equal to the specified Keep-Alive ping delay in milliseconds.

i don't understand this as SO_KEEPALIVE is a boolean in the UNIX & Windows worlds, it isn't a ping delay in milliseconds.

so what system/API is this targeting, and how are implementers expected to support it ?

vapier commented 2 years ago

hmm, i see Chrome at least is using TCP_KEEPIDLE & TCP_KEEPINTVL on UNIX systems while treating SO_KEEPALIVE as a proper boolean. so the docs are just misleading here.

GrapeGreen commented 1 year ago

Fixed in https://github.com/WICG/direct-sockets/pull/63