Tectu / malloy

A cross-platform C++20 library providing embeddable server & client components for HTTP and WebSocket.
BSD 3-Clause "New" or "Revised" License
66 stars 8 forks source link

WebSocket connection `stop()` naming #53

Closed Tectu closed 3 years ago

Tectu commented 3 years ago

Currently, websocket::connection() has the following (relevant for this discussion) functions:

I would like to argue that stop() is not really fitting in this scheme. Personally I would go with renaming it to disconnect() instead.

@0x00002a Any objections?

0x00002a commented 3 years ago

Nope, only reason its stop is because I ported the server side of websocket first. Not sure disconnect fits great but no objections. close might work too (but also doesn't fit great). Up to you :p

Tectu commented 3 years ago

I'd say lets go with disconnect() as that tends to pair well with connect() :p Naming it close() would make sense too but then I'd feel the urge to rename connect() to open() ^^