Deskflow 1.24.0.365
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
IDataSocket Class Referenceabstract

Data stream socket interface. More...

#include <IDataSocket.h>

Inheritance diagram for IDataSocket:
Collaboration diagram for IDataSocket:

Classes

class  ConnectionFailedInfo

Public Member Functions

 IDataSocket (const IEventQueue *events)
manipulators
virtual void connect (const NetworkAddress &)=0
 Connect socket.
void close () override
 Close socket.
void * getEventTarget () const override
 Get event target.
virtual bool isFatal () const =0
Public Member Functions inherited from ISocket
virtual ~ISocket ()=default
virtual void bind (const NetworkAddress &)=0
 Bind socket to address.
Public Member Functions inherited from deskflow::IStream
 IStream ()=default
virtual ~IStream ()=default
virtual uint32_t read (void *buffer, uint32_t n)=0
 Read from stream.
virtual void write (const void *buffer, uint32_t n)=0
 Write to stream.
virtual void flush ()=0
 Flush the stream.
virtual void shutdownInput ()=0
 Shutdown input.
virtual void shutdownOutput ()=0
 Shutdown output.
virtual bool isReady () const =0
 Test if read() will succeed.
virtual uint32_t getSize () const =0
 Get bytes available to read.

Detailed Description

Data stream socket interface.

This interface defines the methods common to all network sockets that represent a full-duplex data stream.

Constructor & Destructor Documentation

◆ IDataSocket()

IDataSocket::IDataSocket ( const IEventQueue * events)
inlineexplicit

Member Function Documentation

◆ close()

void IDataSocket::close ( )
overridevirtual

Close socket.

Closes the socket. This should flush the output stream.

Implements ISocket.

Reimplemented in SecureSocket, and TCPSocket.

◆ connect()

virtual void IDataSocket::connect ( const NetworkAddress & )
pure virtual

Connect socket.

Attempt to connect to a remote endpoint. This returns immediately and sends a connected event when successful or a connection failed event when it fails. The stream acts as if shutdown for input and output until the stream connects.

Implemented in SecureSocket, and TCPSocket.

◆ getEventTarget()

void * IDataSocket::getEventTarget ( ) const
overridevirtual

Get event target.

Returns the event target for events generated by this socket.

Implements ISocket.

Reimplemented in TCPSocket.

◆ isFatal()

virtual bool IDataSocket::isFatal ( ) const
pure virtual

Implemented in SecureSocket, and TCPSocket.


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