Go to the documentation of this file.
47 #ifndef CCXX_MISSING_H_
51 #ifndef CCXX_SOCKET_H_
55 #ifdef CCXX_NAMESPACES
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
Unix domain sockets are used for stream based connected sessions between processes on the same machin...
Definition: unix.h:74
void allocate(int size)
Used to allocate the buffer space needed for iostream operations.
Every thread of execution in an application is created by instantiating an object of a class derived ...
Definition: thread.h:1094
void initial(void)
The initial method is used to esablish a connection when delayed completion is used.
virtual ~UnixSession()
Virtual destructor.
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 ...
unsigned long timeout_t
Definition: thread.h:74
void setTimeout(timeout_t to)
Set the I/O operation timeout for socket I/O operations.
Definition: unix.h:221
void open(const char *pathname, int buffer=512)
Open a tcp stream connection.
Definition: unix.h:304
void close(void)
Close the active tcp stream connection.
char * pbuf
Definition: unix.h:126
timeout_t timeout
Definition: unix.h:124
unixstream(const char *pathname, int buffer=512)
Construct and "open" (connect) the tcp stream to a remote socket.
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...
int getBufferSize(void) const
Return the size of the current stream buffering used.
Definition: unix.h:260
int uflow(void)
This streambuf method is used for doing unbuffered reads through the established unix domain socket c...
@ pendingInput
Definition: socket.h:175
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 open(UnixSocket &unixsock, int buffer=512)
Open a tcp stream connection by accepting a tcp socket.
virtual ~UnixStream()
Flush and empty all buffers, and then remove the allocated buffers.
UnixStream(const UnixStream &source)
A copy constructor creates a new stream buffer.
#define __EXPORT
Definition: config.h:979
The Socket is used as the base for all Internet protocol services under Common C++.
Definition: socket.h:120
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.
int waitConnection(timeout_t timeout=TIMEOUT_INF)
Normally called during the thread Initial() method by default, this will wait for the socket connecti...
Pending
Definition: socket.h:174
int bufsize
Definition: unix.h:125
virtual bool isPending(Pending pend, timeout_t timeout=TIMEOUT_INF)
Get the status of pending operations.
The socket port is an internal class which is attached to and then serviced by a specific SocketServi...
Definition: socketport.h:82
virtual ~UnixSocket()
Use base socket handler for ending this socket.
A more natural C++ "unixstream" class for use by non-threaded applications.
Definition: unix.h:272
int sync(void)
Flushes the stream input and output buffers, writes pending output.
void connect(const char *pathname, int size)
Create a Unix domain stream by connecting to a Unix domain socket.
substitute functions which may be missing in target platform libc.
bool operator!() const
Test to see if stream is open.
std::iostream * unixstr(void)
Used in derived classes to refer to the current object via it's iostream.
Definition: unix.h:190
void endStream(void)
Used to terminate the buffer space and cleanup the socket connection.
char * path
Definition: unix.h:81
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...
The Unix domain session is used to primarily to represent a client connection that can be managed on ...
Definition: unix.h:336
Network addresses and sockets related classes.
Unix streams are used to represent Unix domain client connections to a local server for accepting cli...
Definition: unix.h:119
bool isPending(Pending pend, timeout_t timeout=TIMEOUT_INF)
Get the status of pending stream data.
UnixStream(bool throwflag=true)
The constructor required for "unixstream", a more C++ style version of the TCPStream class.
bool isPendingConnection(timeout_t timeout=TIMEOUT_INF)
Used to wait for pending connection requests.
Definition: unix.h:97
char * gbuf
Definition: unix.h:126
unixstream(UnixSocket &unixsock, int buffer=512)
Construct and "accept" (connect) the tcp stream through a server.
unixstream()
Construct an unopened "tcpstream" object.
virtual int underflow(void)
This streambuf method is used to load the input buffer through the established unix domain socket con...
int overflow(int ch)
This streambuf method is used to write the output buffer through the established unix domain connecti...
#define TIMEOUT_INF
Definition: thread.h:115