Very Simple Cross-Platform Library
Public Member Functions | List of all members
hu::varadiistvan::scpl::io::LocalClientSocket Class Reference

#include <LocalClientSocket.h>

Inheritance diagram for hu::varadiistvan::scpl::io::LocalClientSocket:
hu::varadiistvan::scpl::io::BufferedStream hu::varadiistvan::scpl::io::Failable

Public Member Functions

 LocalClientSocket (const char *name, Waiter *waiter=0, size_t readingCapacity=DEFAULT_CAPACITY, size_t writingCapacity=DEFAULT_CAPACITY)
 
LocalConnectorgetConnector ()
 
- Public Member Functions inherited from hu::varadiistvan::scpl::io::BufferedStream
virtual ~BufferedStream ()
 
ReadingBuffergetReadingBuffer ()
 
WritingBuffergetWritingBuffer ()
 
- Public Member Functions inherited from hu::varadiistvan::scpl::io::Failable
 Failable ()
 
bool failed () const
 
errorCode_t getErrorCode () const
 
void repair ()
 

Additional Inherited Members

- Static Public Attributes inherited from hu::varadiistvan::scpl::io::BufferedStream
static const size_t DEFAULT_CAPACITY = 4096
 
- Protected Member Functions inherited from hu::varadiistvan::scpl::io::Failable
void setErrorCode (errorCode_t ec)
 

Detailed Description

Client socket that connects to a server socket locally. On Linux it is a Unix socket, on Windows it is a named pipe.

The server socket's name should be given.

Definition at line 51 of file LocalClientSocket.h.

Constructor & Destructor Documentation

◆ LocalClientSocket()

hu::varadiistvan::scpl::io::LocalClientSocket::LocalClientSocket ( const char *  name,
Waiter waiter = 0,
size_t  readingCapacity = DEFAULT_CAPACITY,
size_t  writingCapacity = DEFAULT_CAPACITY 
)

Construct the client socket with the given name.

Parameters
namethe name of the server socket
waiterthe waiter to use for waiting a possible event occuring on the socket. If given, the socket will be non-blocking. Otherwise, it will be blocking, and the connect() function of the Connector might block as well as the reading and writing buffers.
readingCapacitythe capacity of the reading buffer
writingCapacitythe capacity of the writing buffer

Member Function Documentation

◆ getConnector()

LocalConnector& hu::varadiistvan::scpl::io::LocalClientSocket::getConnector ( )

Get the connector. Use this object to connect to another socket.


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