44 #ifndef CCXX_SOCKETPORT_H_
45 #define CCXX_SOCKETPORT_H_
47 #ifndef CCXX_ADDRESS_H_
51 #ifndef CCXX_SOCKET_H_
55 #ifdef CCXX_NAMESPACES
87 struct timeval porttimer;
163 void setDetectPending(
bool );
169 {
return detect_pending; }
175 void setDetectOutput(
bool );
181 {
return detect_output; }
187 virtual void expired(
void);
193 virtual void pending(
void);
199 virtual void output(
void);
205 virtual void disconnect(
void);
231 inline ssize_t
send(
const void *buf,
size_t len)
232 {
return _IORET64 ::send(so, (
const char *)buf,
_IOLEN64 len, 0);};
243 {
return _IORET64 ::recv(so, (
char *)buf,
_IOLEN64 len, 0);};
253 inline ssize_t
peek(
void *buf,
size_t len)
254 {
return _IORET64 ::recv(so, (
char *)buf,
_IOLEN64 len, MSG_PEEK);};
329 virtual void onUpdate(
unsigned char buf);
336 virtual void onEvent(
void);
358 void update(
unsigned char flag = 0xff);
368 SocketService(
int pri = 0,
size_t stack = 0,
const char *
id = NULL);
386 #ifdef CCXX_NAMESPACES
The Socket is used as the base for all Internet protocol services under Common C++.
ssize_t peek(void *buf, size_t len)
Examine the content of the next packet.
unsigned short tpport_t
Transport Protocol Ports.
The Mutex class is used to protect a section of code so that at any given time only a single thread c...
bool getDetectPending(void) const
Get the current state of the DetectPending flag.
class __EXPORT SocketService
Network addresses and sockets related classes.
TCP sockets are used for stream based connected sessions between two sockets.
ssize_t receive(void *buf, size_t len)
Receive a message from any host.
ssize_t send(const void *buf, size_t len)
Transmit "send" data to a connected peer host.
int getCount(void) const
Get current reference count.
The socket port is an internal class which is attached to and then serviced by a specific SocketServi...
void attach(SocketPort *port)
Attach a new socket port to this service thread.
Every thread of execution in an application is created by instantiating an object of a class derived ...
SocketPort *volatile * last
Timer ports are used to provide synchronized timing events when managed under a "service thread" such...
class __EXPORT SocketPort
This object is used to hold the actual and valid internet address of a specific host machine that wil...
The network name and address objects are all derived from a common IPV4Address base class...
The SocketService is a thread pool object that is meant to service attached socket ports...
Network addresses and sockets related classes.
bool getDetectOutput(void) const
Get the current state of the DetectOutput flag.