87 if (this->
socket.isvalid())
89 this->
socket->SetBlocking(b);
The common base class of Nebula.
Definition refcounted.h:38
Represents an IP address, consisting of a IPv4 host address and a port number.
A TcpClient object is used to communicate with a TcpServer.
Definition stdtcpclient.h:35
void SetBlocking(bool b)
enable/disable blocking behaviour
Definition stdtcpclient.h:84
bool Recv()
receive data from server into recv stream
Definition stdtcpclient.cc:234
Ptr< IO::Stream > sendStream
Definition stdtcpclient.h:75
Ptr< IO::Stream > recvStream
Definition stdtcpclient.h:76
bool blocking
Definition stdtcpclient.h:74
StdTcpClient()
constructor
Definition stdtcpclient.cc:20
bool IsConnected()
return true if currently connected
Definition stdtcpclient.cc:107
bool inConnectionState
Definition stdtcpclient.h:77
virtual ~StdTcpClient()
destructor
Definition stdtcpclient.cc:32
Result Connect()
establish a connection with the server
Definition stdtcpclient.cc:52
void SetServerAddress(const IpAddress &addr)
set the server address to connect to
Definition stdtcpclient.h:106
Result
Definition stdtcpclient.h:39
@ Connecting
Definition stdtcpclient.h:42
@ Success
Definition stdtcpclient.h:41
@ Error
Definition stdtcpclient.h:40
const IpAddress & GetServerAddress() const
get the server address
Definition stdtcpclient.h:115
__DeclareClass(StdTcpClient)
void Disconnect()
disconnect from the server
Definition stdtcpclient.cc:132
const Ptr< IO::Stream > & GetRecvStream()
access to recv stream
Definition stdtcpclient.cc:274
Ptr< Socket > socket
Definition stdtcpclient.h:72
bool IsBlocking() const
get blocking behaviour
Definition stdtcpclient.h:97
const Ptr< IO::Stream > & GetSendStream()
access to send stream
Definition stdtcpclient.cc:265
IpAddress serverAddr
Definition stdtcpclient.h:73
bool Send()
send accumulated content of send stream to server
Definition stdtcpclient.cc:147
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Definition debugmessage.h:20