16 #include "networkmod.h" 48 Socket(
bool haveeventloop=
true);
49 Socket(
mQtclass(QTcpSocket)*,
bool haveeventloop=
true);
52 void setTimeout(
int ms) { timeout_ = ms; }
54 static const char* sKeyLocalHost() {
return "localhost"; }
56 bool connectToHost(
const char* host,
int port,
58 bool disconnectFromHost(
bool wait=
false);
61 bool isConnected()
const;
67 bool writeShort(
short);
70 bool writeFloat(
float);
71 bool writeDouble(
double);
73 bool write(
const IOPar&);
77 bool writeArray(
const void*,
od_int64,
bool wait=
false);
78 bool writeShortArray(
const short*,
od_int64,
bool wait=
false);
81 bool writeFloatArray(
const float*,
od_int64,
bool wait=
false);
82 bool writeDoubleArray(
const double*,
od_int64,
bool wait=
false);
84 enum ReadStatus { ReadOK, Timeout, ReadError };
86 bool readShort(
short&)
const;
89 bool readFloat(
float&)
const;
90 bool readDouble(
double&)
const;
92 bool read(
IOPar&)
const;
95 ReadStatus readArray(
void*,
od_int64)
const;
96 bool readShortArray(
short*,
od_int64)
const;
99 bool readFloatArray(
float*,
od_int64)
const;
100 bool readDoubleArray(
double*,
od_int64)
const;
107 const void* thread()
const {
return thread_; }
110 bool waitForConnected()
const;
112 bool waitForNewData()
const;
114 bool waitForWrite(
bool all)
const;
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
#define mQtclass(cls)
Definition: commondefs.h:229
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
Definition: jobcommunic.h:24
bool readChar(std::istream &, char &, bool allowreadingnewlines=false)
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
#define od_int64
Definition: plftypes.h:36
Definition: i_layout.h:35
Definition: uistring.h:89
Definition: netreqpacket.h:39
od_int64 bytesAvailable(const char *path)
Definition: callback.h:254
Byte-level data interpreter.
Definition: cbvswriter.h:22
Definition: qtcpsocketcomm.h:25
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
encapsulates the read-access-only part of strings in OD.
Definition: odstring.h:31
#define mFDQtclass(cls)
Definition: commondefs.h:228
#define od_int32
Definition: plftypes.h:31
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
BufferString errmsg_
Definition: horizontracker.h:119
const char * errMsg() const
Definition: horizontracker.h:61