47#ifndef CCXX_MISSING_H_
191 {
return ((std::iostream *)
this);};
304 void open(
const char *pathname,
int buffer = 512)
370 UnixSession(
const char* pathname,
int size = 512,
int pri = 0,
int stack = 0);
382 int pri = 0,
int stack = 0);
392#ifdef CCXX_NAMESPACES
Pending
Definition socket.h:174
@ pendingInput
Definition socket.h:175
Socket(int domain, int type, int protocol=0)
An unconnected socket may be created directly on the local machine.
virtual bool isPending(Pending pend, timeout_t timeout=TIMEOUT_INF)
Get the status of pending operations.
Thread(bool isMain)
This is actually a special constructor that is used to create a thread "object" for the current execu...
UnixSession(const char *pathname, int size=512, int pri=0, int stack=0)
Create a Unix domain socket that will be connected to a local server server and that will execute und...
void initial(void)
The initial method is used to esablish a connection when delayed completion is used.
int waitConnection(timeout_t timeout=TIMEOUT_INF)
Normally called during the thread Initial() method by default, this will wait for the socket connecti...
virtual ~UnixSession()
Virtual destructor.
UnixSession(UnixSocket &server, int size=512, int pri=0, int stack=0)
Create a Unix domain socket from a bound Unix domain server by accepting a pending connection from th...
Unix domain sockets are used for stream based connected sessions between processes on the same machin...
Definition unix.h:74
virtual ~UnixSocket()
Use base socket handler for ending this socket.
bool isPendingConnection(timeout_t timeout=TIMEOUT_INF)
Used to wait for pending connection requests.
Definition unix.h:97
friend class SocketPort
Definition unix.h:77
friend class UnixStream
Definition unix.h:76
UnixSocket(const char *pathname, int backlog=5)
A Unix domain "server" is created as a Unix domain socket that is bound to a pathname and that has a ...
friend class unixstream
Definition unix.h:78
char * path
Definition unix.h:81
int uflow(void)
This streambuf method is used for doing unbuffered reads through the established unix domain socket c...
std::iostream * unixstr(void)
Used in derived classes to refer to the current object via it's iostream.
Definition unix.h:190
void connect(const char *pathname, int size)
Create a Unix domain stream by connecting to a Unix domain socket.
void setTimeout(timeout_t to)
Set the I/O operation timeout for socket I/O operations.
Definition unix.h:221
UnixStream(UnixSocket &server, int size=512, bool throwflag=true, timeout_t timeout=0)
Create a Unix domain stream by accepting a connection from a bound Unix domain socket acting as a ser...
void allocate(int size)
Used to allocate the buffer space needed for iostream operations.
int getBufferSize(void) const
Return the size of the current stream buffering used.
Definition unix.h:260
UnixStream(const UnixStream &source)
A copy constructor creates a new stream buffer.
void endStream(void)
Used to terminate the buffer space and cleanup the socket connection.
char * pbuf
Definition unix.h:126
char * gbuf
Definition unix.h:126
UnixStream(const char *pathname, int size=512, bool throwflag=true, timeout_t to=0)
Create a Unix domain stream by connecting to a Unix domain socket.
bool isPending(Pending pend, timeout_t timeout=TIMEOUT_INF)
Get the status of pending stream data.
virtual ~UnixStream()
Flush and empty all buffers, and then remove the allocated buffers.
UnixStream(bool throwflag=true)
The constructor required for "unixstream", a more C++ style version of the TCPStream class.
timeout_t timeout
Definition unix.h:124
int overflow(int ch)
This streambuf method is used to write the output buffer through the established unix domain connecti...
virtual int underflow(void)
This streambuf method is used to load the input buffer through the established unix domain socket con...
int bufsize
Definition unix.h:125
int sync(void)
Flushes the stream input and output buffers, writes pending output.
unixstream(UnixSocket &unixsock, int buffer=512)
Construct and "accept" (connect) the tcp stream through a server.
unixstream()
Construct an unopened "tcpstream" object.
void open(UnixSocket &unixsock, int buffer=512)
Open a tcp stream connection by accepting a tcp socket.
void open(const char *pathname, int buffer=512)
Open a tcp stream connection.
Definition unix.h:304
bool operator!() const
Test to see if stream is open.
void close(void)
Close the active tcp stream connection.
unixstream(const char *pathname, int buffer=512)
Construct and "open" (connect) the tcp stream to a remote socket.
#define __EXPORT
Definition config.h:1056
substitute functions which may be missing in target platform libc.
Network addresses and sockets related classes.
#define TIMEOUT_INF
Definition thread.h:115
unsigned long timeout_t
Definition thread.h:74