Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
TCPListenSocket Class Reference

TCP listen socket. More...

#include <TCPListenSocket.h>

Inheritance diagram for TCPListenSocket:
Collaboration diagram for TCPListenSocket:

Public Member Functions

 TCPListenSocket (IEventQueue *events, SocketMultiplexer *socketMultiplexer, IArchNetwork::AddressFamily family)
 TCPListenSocket (TCPListenSocket const &)=delete
 TCPListenSocket (TCPListenSocket &&)=delete
 ~TCPListenSocket () override
TCPListenSocketoperator= (TCPListenSocket const &)=delete
TCPListenSocketoperator= (TCPListenSocket &&)=delete
void bind (const NetworkAddress &) override
 Bind socket to address.
void close () override
 Close socket.
void * getEventTarget () const override
 Get event target.
std::unique_ptr< IDataSocketaccept () override
 Accept connection.
ISocketMultiplexerJobserviceListening (ISocketMultiplexerJob *, bool, bool, bool)
Public Member Functions inherited from IListenSocket
Public Member Functions inherited from ISocket
Public Member Functions inherited from IInterface
virtual ~IInterface ()=default
 Interface destructor does nothing.

Protected Member Functions

void setListeningJob ()

Protected Attributes

IEventQueuem_events
ArchSocket m_socket
SocketMultiplexerm_socketMultiplexer

Detailed Description

TCP listen socket.

A listen socket using TCP.

Constructor & Destructor Documentation

◆ TCPListenSocket() [1/3]

TCPListenSocket::TCPListenSocket ( IEventQueue * events,
SocketMultiplexer * socketMultiplexer,
IArchNetwork::AddressFamily family )

◆ TCPListenSocket() [2/3]

TCPListenSocket::TCPListenSocket ( TCPListenSocket const & )
delete

◆ TCPListenSocket() [3/3]

TCPListenSocket::TCPListenSocket ( TCPListenSocket && )
delete

◆ ~TCPListenSocket()

TCPListenSocket::~TCPListenSocket ( )
override

Member Function Documentation

◆ accept()

std::unique_ptr< IDataSocket > TCPListenSocket::accept ( )
overridevirtual

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().

Implements IListenSocket.

◆ bind()

void TCPListenSocket::bind ( const NetworkAddress & )
overridevirtual

Bind socket to address.

Binds the socket to a particular address.

Implements IListenSocket.

◆ close()

void TCPListenSocket::close ( )
overridevirtual

Close socket.

Closes the socket. This should flush the output stream.

Implements IListenSocket.

◆ getEventTarget()

void * TCPListenSocket::getEventTarget ( ) const
overridevirtual

Get event target.

Returns the event target for events generated by this socket.

Implements IListenSocket.

◆ operator=() [1/2]

TCPListenSocket & TCPListenSocket::operator= ( TCPListenSocket && )
delete

◆ operator=() [2/2]

TCPListenSocket & TCPListenSocket::operator= ( TCPListenSocket const & )
delete

◆ serviceListening()

ISocketMultiplexerJob * TCPListenSocket::serviceListening ( ISocketMultiplexerJob * job,
bool read,
bool ,
bool error )

◆ setListeningJob()

void TCPListenSocket::setListeningJob ( )
protected

Member Data Documentation

◆ m_events

IEventQueue* TCPListenSocket::m_events
protected

◆ m_socket

ArchSocket TCPListenSocket::m_socket
protected

◆ m_socketMultiplexer

SocketMultiplexer* TCPListenSocket::m_socketMultiplexer
protected

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