Nebula
Loading...
Searching...
No Matches
messageclientconnection.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
21#include "net/tcpmessagecodec.h"
22#include "util/queue.h"
23
24//------------------------------------------------------------------------------
25namespace Net
26{
28{
30public:
31 // Constructor
33 // Destructor
35
37 virtual bool Connect(const Ptr<Socket>& s);
39 virtual void Shutdown();
40
42 virtual Socket::Result Send();
44 virtual Socket::Result Send(const Ptr<IO::Stream>& stream);
46 virtual const Ptr<IO::Stream>& GetSendStream();
48 virtual Socket::Result Recv();
50 virtual const Ptr<IO::Stream>& GetRecvStream();
51
52private:
57};
58} // namespace Net
A wrapper class for the Net::TcpClientConnection.
Definition messageclientconnection.h:28
virtual Socket::Result Recv()
receive data from server into recv stream
Definition messageclientconnection.cc:117
virtual void Shutdown()
shutdown the connection
Definition messageclientconnection.cc:59
virtual const Ptr< IO::Stream > & GetRecvStream()
access to recv stream
Definition messageclientconnection.cc:172
Util::Queue< Ptr< IO::Stream > > msgQueue
Definition messageclientconnection.h:55
__DeclareClass(MessageClientConnection)
virtual ~MessageClientConnection()
Destructor
Definition messageclientconnection.cc:31
virtual const Ptr< IO::Stream > & GetSendStream()
access to send stream
Definition messageclientconnection.cc:105
MessageClientConnection()
Constructor.
Definition messageclientconnection.cc:22
Ptr< IO::Stream > recvMessageStream
Definition messageclientconnection.h:54
Ptr< IO::Stream > sendMessageStream
Definition messageclientconnection.h:53
virtual bool Connect(const Ptr< Socket > &s)
connect using provided socket
Definition messageclientconnection.cc:41
virtual Socket::Result Send()
send accumulated content of send stream to server
Definition messageclientconnection.cc:73
TcpMessageCodec codec
Definition messageclientconnection.h:56
See StdTcpClientConnection for details!
Helperclass that provides function to encode and decode sreams into messages.
Definition tcpmessagecodec.h:29
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Nebula's queue class (a FIFO container).
Definition queue.h:28
Definition debugmessage.h:20