Go to the documentation of this file.
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;
96 bool detect_disconnect;
163 void setDetectPending(
bool );
168 bool getDetectPending(
void )
const
169 {
return detect_pending; }
175 void setDetectOutput(
bool );
180 bool getDetectOutput(
void )
const
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);};
242 inline ssize_t receive(
void *buf,
size_t len)
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);
382 inline int getCount(
void)
const
386 #ifdef CCXX_NAMESPACES