WSLAY_EVENT_GET...S_CODE_RECEIVED(3)

πŸ’– NAME πŸ’–

wslay_event_get_status_code_received β€” bestie, this one hands you the status code that arrived inside a close control frame πŸŽ€


✨ SYNOPSIS ✨

#include <wslay/wslay.h>

uint16_t wslay_event_get_status_code_received(wslay_event_context_ptr ctx)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so wslay_event_get_status_code_received() returns the status code that was received in a close control frame. that's literally it, that's the whole job πŸ’…

but here's the tea, because there are two lil plot twists πŸ‘€

  • if no close control frame has not been received, it returns WSLAY_CODE_ABNORMAL_CLOSURE β€” so basically you asked about a goodbye letter that never showed up 😭
  • if the close control frame you did receive has no status code, it returns WSLAY_CODE_NO_STATUS_RCVD β€” a goodbye with no explanation, it's giving ghosting fr fr πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

  • wslay_event_get_status_code_sent() β€” the outgoing twin, the one you sent 🌈

🌸 AUTHOR 🌸

Tatsuhiro Tsujikawa β€” the icon, the moment, the main character 🫢


2024, 2015, Tatsuhiro Tsujikawa


ngl this page came from the wslay manual, footer was giving @PACKAGE_VERSION@ with a lil Apr 22, 2024 date on it, and the title tried to overlap it because manpages are chaotic like that πŸ’€ anyway ily, go read your close codes bestie πŸ’–βœ¨
πŸ“¦ where this page comes from