1 #ifndef netreqcommunic_h 2 #define netreqcommunic_h 15 #include "networkmod.h" 50 unsigned short serverport,
51 bool multithreaded=
true,
52 int connectiontimeout=-1);
61 const char*
server()
const {
return servername_; }
62 unsigned short port()
const {
return serverport_; }
63 int ID()
const {
return id_; }
66 bool waitforfinish=
false);
118 void socketThreadFunc(CallBacker*);
122 void connectToHost();
124 void connCloseCB(CallBacker*);
125 void newConnectionCB(CallBacker*);
126 void dataArrivedCB(CallBacker*);
131 bool readFromSocket();
132 bool writeToSocket();
162 void newConnectionCB(CallBacker*);
static int cDisconnected()
Definition: netreqconnection.h:81
#define mExpClass(module)
Definition: commondefs.h:160
Is an object that faciliates many threads to wait for something to happen.
Definition: thread.h:108
ThreadReadStatus
Definition: netreqconnection.h:95
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
bool readfirst_
Definition: netreqconnection.h:120
Definition: jobcommunic.h:24
bool sendwithwait_
Definition: netreqconnection.h:107
bool sendresult_
Definition: netreqconnection.h:108
Threads::Thread * socketthread_
Definition: netreqconnection.h:117
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
CNotifier< RequestConnection, od_int32 > packetArrived
Definition: netreqconnection.h:86
Socket * socket()
Definition: netreqconnection.h:84
ThreadReadStatus threadreadstatus_
Definition: netreqconnection.h:96
int timeout_
Definition: netreqconnection.h:103
const char * server() const
Definition: netreqconnection.h:61
int id_
Definition: netreqconnection.h:112
unsigned short serverport_
Definition: netreqconnection.h:115
int ID() const
Definition: netreqconnection.h:63
Server * server_
Definition: netreqconnection.h:170
Socket * socket_
Definition: netreqconnection.h:102
unsigned short serverport_
Definition: netreqconnection.h:169
uiString errMsg() const
Becomes yours.
Definition: netreqconnection.h:158
Definition: uistring.h:89
Definition: netreqpacket.h:39
FixedString None()
Definition: keystrs.h:90
uiString errmsg_
Definition: netreqconnection.h:93
Definition: netreqconnection.h:46
Definition: callback.h:254
Set of pointers to objects.
Definition: commontypes.h:32
Is the base class for all threads. Start it by creating it and give it the function or CallBack to ex...
Definition: thread.h:283
Definition: netreqconnection.h:95
Definition: netreqconnection.h:145
bool isMultiThreaded()
Definition: netreqconnection.h:83
Threads::Lock lock_
Definition: netreqconnection.h:168
const RequestPacket * packettosend_
Definition: netreqconnection.h:106
unsigned short port() const
Definition: netreqconnection.h:62
TypeSet< od_int32 > ourrequestids_
Definition: netreqconnection.h:98
Threads::ConditionVar lock_
Definition: netreqconnection.h:101
bool stopflag_
Definition: netreqconnection.h:119
#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
Notifier< RequestConnection > connectionClosed
Definition: netreqconnection.h:87
bool sendingfinished_
Definition: netreqconnection.h:109
Server * server()
Definition: netreqconnection.h:152
BufferString errmsg_
Definition: horizontracker.h:119
bool triggerread_
Definition: netreqconnection.h:110
ObjectSet< RequestPacket > receivedpackets_
Definition: netreqconnection.h:99
static int cTimeout()
Definition: netreqconnection.h:80
static int cInvalidRequest()
Definition: netreqconnection.h:79
uiString errmsg_
Definition: netreqconnection.h:164
Notifier with automatic capsule creation.
Definition: callback.h:395
Notifier< RequestServer > newConnection
Definition: netreqconnection.h:154
ObjectSet< RequestConnection > pendingconns_
Definition: netreqconnection.h:166
uiString errMsg() const
Definition: netreqconnection.h:89
BufferString servername_
Definition: netreqconnection.h:114
bool ownssocket_
Definition: netreqconnection.h:104