sysapps / tcp-udp-sockets

Raw sockets API
86 stars 25 forks source link

TCPServer socket: onConnect or onAccept? #43

Closed ClaesNilsson closed 11 years ago

ClaesNilsson commented 11 years ago

[Patrick]

  • for the server socket API it should be called "onAccept" instead of "onConnect" to match the commonly understood sockets API - accept() is the system call you used to take an incoming connection. There doesn't seem to be a compelling reason to invent new lingo for well understood operations.

[Ke-Fong]: I'd rather think "onconnect" is good enough. It can match other W3C's APIs and it is the correct term (contrary to "onmessage"). onaccept would definitely ring a bell for seasoned socket programmers, but I'd rather think we should keep onconnect.

[Claes] I don't have a strong opinion here but listening to Jonas and Ke-Fong "connect" seems to have slightly more support than "accept" so I propose to stay with "connect".