18 #ifndef INCLUDE_RCF_TCPSERVERTRANSPORT_HPP 19 #define INCLUDE_RCF_TCPSERVERTRANSPORT_HPP 21 #include <RCF/AsioServerTransport.hpp> 23 #include <RCF/IpAddress.hpp> 28 class TcpServerTransport;
30 class RCF_EXPORT TcpNetworkSession :
public AsioNetworkSession
35 TcpServerTransport &transport,
36 AsioIoService & ioService);
38 virtual ~TcpNetworkSession();
40 const RemoteAddress & implGetRemoteAddress();
42 void implRead(
char * buffer, std::size_t bufferLen);
44 void implWrite(
const std::vector<ByteBuffer> & buffers);
47 AsioNetworkSession &toBeNotified,
49 std::size_t bufferLen);
57 void implCloseAfterWrite();
59 bool implIsConnected();
63 void implTransferNativeFrom(ClientTransport & clientTransport);
65 int getNativeHandle();
69 AsioSocketPtr mSocketPtr;
74 class RCF_EXPORT TcpServerTransport :
75 public AsioServerTransport,
76 public IpServerTransport
79 TcpServerTransport(
const IpAddress & ipAddress);
80 TcpServerTransport(
const std::string & ip,
int port);
91 AsioNetworkSessionPtr implCreateNetworkSession();
94 void onServerStart(RcfServer & server);
97 const Endpoint &endpoint);
100 IpAddress mIpAddress;
107 #endif // ! INCLUDE_RCF_TCPSERVERTRANSPORT_HPP
std::unique_ptr< ClientTransport > ClientTransportUniquePtr
Unique pointer wrapper for RCF::ClientTransport.
Definition: RcfFwd.hpp:43
Definition: AmiIoHandler.hpp:23
TransportType
Describes the transport types used by a RCF connection.
Definition: Enums.hpp:33
std::shared_ptr< ServerTransport > ServerTransportPtr
Unique pointer wrapper for RCF::ServerTransport.
Definition: RcfFwd.hpp:46