19 #ifndef INCLUDE_RCF_TCPSERVERTRANSPORT_HPP 20 #define INCLUDE_RCF_TCPSERVERTRANSPORT_HPP 22 #include <RCF/AsioServerTransport.hpp> 24 #include <RCF/IpAddress.hpp> 29 class TcpServerTransport;
31 class RCF_EXPORT TcpNetworkSession :
public AsioNetworkSession
36 TcpServerTransport &transport,
37 AsioIoService & ioService);
39 virtual ~TcpNetworkSession();
41 const RemoteAddress & implGetRemoteAddress();
43 void implRead(
char * buffer, std::size_t bufferLen);
45 void implWrite(
const std::vector<ByteBuffer> & buffers);
48 AsioNetworkSession &toBeNotified,
50 std::size_t bufferLen);
58 void implCloseAfterWrite();
60 bool implIsConnected();
64 void implTransferNativeFrom(ClientTransport & clientTransport);
66 int getNativeHandle();
70 AsioSocketPtr mSocketPtr;
75 class RCF_EXPORT TcpServerTransport :
76 public AsioServerTransport,
77 public IpServerTransport
80 TcpServerTransport(
const IpAddress & ipAddress);
81 TcpServerTransport(
const std::string & ip,
int port);
92 AsioNetworkSessionPtr implCreateNetworkSession();
95 void onServerStart(RcfServer & server);
98 const Endpoint &endpoint);
101 IpAddress mIpAddress;
108 #endif // ! INCLUDE_RCF_TCPSERVERTRANSPORT_HPP
std::unique_ptr< ClientTransport > ClientTransportUniquePtr
Unique pointer wrapper for RCF::ClientTransport.
Definition: RcfFwd.hpp:43
Definition: AmiIoHandler.hpp:24
TransportType
Describes the transport types used by a RCF connection.
Definition: Enums.hpp:34
std::shared_ptr< ServerTransport > ServerTransportPtr
Unique pointer wrapper for RCF::ServerTransport.
Definition: RcfFwd.hpp:46