Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
IListenSocket Class Referenceabstract

Listen socket interface. More...

#include <IListenSocket.h>

Inheritance diagram for IListenSocket:
Collaboration diagram for IListenSocket:

Public Member Functions

manipulators
virtual std::unique_ptr< IDataSocketaccept ()=0
 Accept connection.
void bind (const NetworkAddress &) override=0
 Bind socket to address.
void close () override=0
 Close socket.
void * getEventTarget () const override=0
 Get event target.
Public Member Functions inherited from ISocket
Public Member Functions inherited from IInterface
virtual ~IInterface ()=default
 Interface destructor does nothing.

Detailed Description

Listen socket interface.

This interface defines the methods common to all network sockets that listen for incoming connections.

Member Function Documentation

◆ accept()

virtual std::unique_ptr< IDataSocket > IListenSocket::accept ( )
pure virtual

Accept connection.

Accept a connection, returning a socket representing the full-duplex data stream. Returns nullptr if no socket is waiting to be accepted. This is only valid after a call to bind().

Implemented in SecureListenSocket, and TCPListenSocket.

◆ bind()

void IListenSocket::bind ( const NetworkAddress & )
overridepure virtual

Bind socket to address.

Binds the socket to a particular address.

Implements ISocket.

Implemented in TCPListenSocket.

◆ close()

void IListenSocket::close ( )
overridepure virtual

Close socket.

Closes the socket. This should flush the output stream.

Implements ISocket.

Implemented in TCPListenSocket.

◆ getEventTarget()

void * IListenSocket::getEventTarget ( ) const
overridepure virtual

Get event target.

Returns the event target for events generated by this socket.

Implements ISocket.

Implemented in TCPListenSocket.


The documentation for this class was generated from the following file: