 |
OpendTect
6.6
|
Go to the documentation of this file.
48 Socket(
bool islocal,
bool haveeventloop=
true);
49 explicit Socket(
mQtclass(QTcpSocket)*,
bool haveeventloop=
true);
50 explicit Socket(
mQtclass(QLocalSocket)*,
bool haveeventloop=
true);
53 void setTimeout(
int ms) { timeout_ = ms; }
55 static const char* sKeyLocalHost() {
return "localhost"; }
57 bool connectToHost(
const Authority&,
bool wait=
true);
58 bool disconnectFromHost(
bool wait=
false);
61 bool isConnected()
const;
65 bool isLocal()
const {
return qlocalsocket_; }
68 bool writeShort(
short);
71 bool writeFloat(
float);
72 bool writeDouble(
double);
74 bool write(
const IOPar&);
78 bool writeArray(
const void*,
od_int64,
bool wait=
false);
79 bool writeShortArray(
const short*,
od_int64,
bool wait=
false);
82 bool writeFloatArray(
const float*,
od_int64,
bool wait=
false);
83 bool writeDoubleArray(
const double*,
od_int64,
bool wait=
false);
85 enum ReadStatus { ReadOK, Timeout, ReadError };
87 bool readShort(
short&)
const;
90 bool readFloat(
float&)
const;
91 bool readDouble(
double&)
const;
93 bool read(
IOPar&)
const;
96 ReadStatus readArray(
void*,
od_int64)
const;
97 bool readShortArray(
short*,
od_int64)
const;
100 bool readFloatArray(
float*,
od_int64)
const;
101 bool readDoubleArray(
double*,
od_int64)
const;
115 bool waitForConnected()
const;
117 bool waitForNewData()
const;
119 bool waitForWrite(
bool all)
const;
123 QString getSocketErrMsg()
const;
126 int timeout_ = 30000;
129 mQtclass(QTcpSocket)* qtcpsocket_ =
nullptr;
130 mQtclass(QLocalSocket)* qlocalsocket_ =
nullptr;
Definition: netreqpacket.h:53
const char * errMsg() const
Definition: horizontracker.h:60
#define od_int64
Definition: plftypes.h:35
#define mExpClass(module)
Definition: commondefs.h:177
Definition: jobcommunic.h:22
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
Byte-level data interpreter.
Definition: cbvswriter.h:21
#define mODTextTranslationClass(clss)
Definition: uistring.h:40
od_int64 bytesAvailable(const char *path)
void * ThreadID
Definition: thread.h:34
Class to help setup a callback handling.
Definition: notify.h:126
@ all
Definition: i_layout.h:35
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
#define mQtclass(cls)
Definition: commondefs.h:234
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
mFDQtclass(QLocalSocket) mFDQtclass(QObject) mFDQtclass(QTcpSocket) mFDQtclass(QTcpSocketComm) namespace Network
Definition: netsocket.h:21
#define od_int32
Definition: plftypes.h:30
encapsulates the read-access-only part of strings in OD.
Definition: odstring.h:31
BufferString errmsg_
Definition: horizontracker.h:118
bool readChar(std::istream &, char &, bool allowreadingnewlines=false)
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class.
Definition: threadlock.h:53
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:55
Definition: qtcpsocketcomm.h:27
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B.V. 1995-2021