NCBI C++ ToolKit
Public Member Functions | Protected Attributes | List of all members
CListeningSocket Class Reference

Search Toolkit Book for CListeningSocket

CListeningSocket:: More...

#include <connect/ncbi_socket.hpp>

+ Inheritance diagram for CListeningSocket:
+ Collaboration diagram for CListeningSocket:

Public Member Functions

 CListeningSocket (void)
 CListeningSocket:: More...
 
 CListeningSocket (unsigned short port, unsigned short backlog=64, TSOCK_Flags flags=fSOCK_LogDefault)
 
virtual ~CListeningSocket (void)
 Call Close(), then self-destruct. More...
 
EIO_Status GetStatus (void) const
 Return eIO_Closed if not yet bound or Close()'d. More...
 
EIO_Status Listen (unsigned short port, unsigned short backlog=64, TSOCK_Flags flags=fSOCK_LogDefault)
 
EIO_Status Accept (CSocket *&sock, const STimeout *timeout=kInfiniteTimeout, TSOCK_Flags flags=fSOCK_LogDefault) const
 
EIO_Status Accept (CSocket &sock, const STimeout *timeout=kInfiniteTimeout, TSOCK_Flags flags=fSOCK_LogDefault) const
 
EIO_Status Close (void)
 
virtual EIO_Status GetOSHandle (void *handle_buf, size_t handle_size, EOwnership ownership=eNoOwnership) const
 Access to the system-specific socket handle. More...
 
unsigned short GetPort (ENH_ByteOrder byte_order) const
 Return port which the server listens on. More...
 
EOwnership SetOwnership (EOwnership if_to_own)
 Specify if this "CListeningSocket" is to own the underlying "LSOCK". More...
 
LSOCK GetLSOCK (void) const
 Access to the underlying "LSOCK". More...
 
bool IsEmpty (void) const
 
virtual POLLABLE GetPOLLABLE (void) const
 
- Public Member Functions inherited from CPollable
virtual ~CPollable ()
 

Protected Attributes

LSOCK m_Socket
 
EOwnership m_IsOwned
 

Additional Inherited Members

- Protected Member Functions inherited from CPollable
 CPollable (void)
 

Detailed Description

CListeningSocket::

Listening socket (to accept connections on the server side)

Note
For documentation see LSOCK_***() functions in "ncbi_socket.h".

Definition at line 627 of file ncbi_socket.hpp.


The documentation for this class was generated from the following files:
Modified on Sun Apr 14 05:26:21 2024 by modify_doxy.py rev. 669887