21 #ifndef __connection_h__
22 #define __connection_h__
24 #include <tdelibs_export.h>
26 #include <sys/types.h>
29 #include <tqptrlist.h>
33 class TQSocketNotifier;
37 struct TDEIO_EXPORT Task {
64 void init(TDESocket *sock);
72 void init(
int fd_in,
int fd_out);
73 void connect(TQObject *receiver = 0,
const char *member = 0);
86 int fd_to()
const {
return fileno( f_out ); }
93 bool inited()
const {
return (fd_in != -1) && (f_out != 0); }
100 void send(
int cmd,
const TQByteArray &arr = TQByteArray());
108 bool sendnow(
int _cmd,
const TQByteArray &data );
118 int read(
int* _cmd, TQByteArray &data );
146 TQSocketNotifier *notifier;
149 TQPtrList<Task> tasks;
152 class ConnectionPrivate* d;
This class provides a simple means for IPC between two applications via a pipe.
bool inited() const
Checks whether the connection has been initialized.
int fd_from() const
Returns the input file descriptor.
int fd_to() const
Returns the output file descriptor.
A namespace for TDEIO globals.