19 #ifndef __UT_NetStream__
20 #define __UT_NetStream__
34 #define NET_STREAM_IN 0
35 #define NET_STREAM_OUT 1
37 #define NET_STREAM_SOCKET 0
38 #define NET_STREAM_PLUG 1
52 void openConnection(
const char *address,
int port,
55 void closeConnection();
77 virtual void receiveData(std::istream &is) = 0;
78 virtual void transmitData(std::ostream &os) = 0;
84 static void *ioLoopEntry(
void *
data);
89 void breakConnection();
109 int mySocketInfoSetFlag;
110 int myCloseConnectionFlag;
111 int myThreadStopFlag;
int isThreadStarted() const
virtual void justConnected()
int isValidStream() const
virtual void dataReceived()