TCPServerSocket(3)

πŸ“¦ version 2.3.1, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

TCPServerSocket β€” bestie, it's the server-side socket class, and she's here to listen. πŸ‘‚βœ¨


🌸 SYNOPSIS 🌸

Inherits TCPSocket.

That's it, that's the whole family tree β€” she gets literally everything from TCPSocket and adds exactly one little thing of her own. Inheritance ate, no cap. πŸ’…


✨ Public Member Functions ✨

  • void listen (int queue_length=8) β€” okay so this is her moment, the one method she brings to the table. She starts listening on the socket, and queue_length is how many pending connections she'll hold in the queue while she's busy. It defaults to 8, so if you don't say anything she's holding eight besties in the waiting room. πŸŽ€

πŸŽ€ Public Member Functions inherited from TCPSocket πŸŽ€

Everything below is handed down from TCPSocket β€” she didn't write these, she just vibes with them. 🫢

  • void create () β€” makes the socket happen. ✨
  • void bind (u_int16_t port_begin, u_int16_t port_fence) β€” locks her onto a port, searching between port_begin and port_fence. πŸšͺ
  • int port () β€” tells you which port she ended up on. πŸ”’
  • u_int32_t addr () β€” hands you the address. πŸ“¬
  • bool initialized () β€” is she initialized? true/false, that's the vibe check. πŸ’€
  • bool bound () β€” is she bound to a port yet? πŸͺ’
  • virtual void close () β€” the virtual goodbye. She's virtual, so she knows how to shut down gracefully. πŸšͺπŸ’¨

πŸ¦‹ Friends πŸ¦‹

  • class TCPServerConnection β€” her one friend, her ride-or-die, the class that gets to peek at her private stuff. πŸ‘―β™€οΈ

🌈 Additional Inherited Members 🌈

Protected Attributes inherited from TCPSocket

These are the protected little secrets she carries around, straight from TCPSocket. πŸ™ˆ

  • int socket_ β€” the raw socket. πŸ”Œ
  • int port_ β€” the port number, chilling in the background. πŸ”’
  • bool initialized_ β€” the flag that says whether she's been initialized. βœ…
  • bool bound_ β€” the flag that says whether she's bound. πŸͺ’

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for MPQC from the source code. So like… a robot wrote this about her. Respect honestly. πŸ€–πŸ’–


And that's the whole page, bestie!! This one's from MPQC, Version 2.3.1, and you just read the manual for TCPServerSocket(3). Go forth and listen (with a queue_length of 8, obviously). πŸŒŸπŸ’…πŸ¦‹

πŸ“¦ where this page comes from