neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::tcp_packet_stream_server< PacketType > Class Template Reference

#include <tcp_packet_stream_server.hpp>

Inheritance diagram for neolib::tcp_packet_stream_server< PacketType >:
neolib::lifetime< Base > neolib::i_lifetime

Classes

struct  failed_to_resolve_local_host
 
struct  stream_not_found
 

Public Types

typedef PacketType packet_type
 
typedef tcp_protocol protocol_type
 
typedef packet_stream< packet_type, protocol_typepacket_stream_type
 
typedef protocol_type::endpoint endpoint_type
 
typedef protocol_type::resolver resolver_type
 
typedef protocol_type::acceptor acceptor_type
 
- Public Types inherited from neolib::lifetime< Base >
typedef neolib::destroyed_flag destroyed_flag
 

Public Member Functions

 define_event (PacketStreamAdded, packet_stream_added, packet_stream_type &) define_event(PacketStreamRemoved
 
 tcp_packet_stream_server (i_async_task &aIoTask, unsigned short aLocalPort, bool aSecure=false, protocol_family aProtocolFamily=IPv4)
 
 tcp_packet_stream_server (i_async_task &aIoTask, const std::string &aLocalHostName, unsigned short aLocalPort, bool aSecure=false, protocol_family aProtocolFamily=IPv4)
 
 ~tcp_packet_stream_server ()
 
unsigned short local_port () const
 
packet_stream_pointer take_ownership (packet_stream_type &aStream)
 
- Public Member Functions inherited from neolib::lifetime< Base >
 lifetime (lifetime_state aState=lifetime_state::Alive)
 
virtual ~lifetime ()
 
lifetime_state object_state () const final
 
std::shared_ptr< std::atomic< lifetime_state > > object_state_ptr () const final
 
bool is_creating () const final
 
bool is_alive () const final
 
bool is_destroying () const final
 
bool is_destroyed () const final
 
void set_alive () override
 
void set_destroying () override
 
void set_destroyed () override
 
- Public Member Functions inherited from neolib::i_lifetime
virtual ~i_lifetime ()=default
 

Public Attributes

packet_stream_type &define_event(FailedToAcceptPacketStream, failed_to_accept_packet_stream, const boost::system::error_code &) private typedef std::vector< packet_stream_pointerstream_list
 
 packet_stream_removed
 

Detailed Description

template<typename PacketType>
class neolib::tcp_packet_stream_server< PacketType >

Definition at line 52 of file tcp_packet_stream_server.hpp.

Member Typedef Documentation

◆ acceptor_type

template<typename PacketType >
typedef protocol_type::acceptor neolib::tcp_packet_stream_server< PacketType >::acceptor_type

Definition at line 71 of file tcp_packet_stream_server.hpp.

◆ endpoint_type

template<typename PacketType >
typedef protocol_type::endpoint neolib::tcp_packet_stream_server< PacketType >::endpoint_type

Definition at line 69 of file tcp_packet_stream_server.hpp.

◆ packet_stream_type

◆ packet_type

◆ protocol_type

◆ resolver_type

template<typename PacketType >
typedef protocol_type::resolver neolib::tcp_packet_stream_server< PacketType >::resolver_type

Definition at line 70 of file tcp_packet_stream_server.hpp.

Constructor & Destructor Documentation

◆ tcp_packet_stream_server() [1/2]

template<typename PacketType >
neolib::tcp_packet_stream_server< PacketType >::tcp_packet_stream_server ( i_async_task aIoTask,
unsigned short  aLocalPort,
bool  aSecure = false,
protocol_family  aProtocolFamily = IPv4 
)
inline

Definition at line 98 of file tcp_packet_stream_server.hpp.

◆ tcp_packet_stream_server() [2/2]

template<typename PacketType >
neolib::tcp_packet_stream_server< PacketType >::tcp_packet_stream_server ( i_async_task aIoTask,
const std::string &  aLocalHostName,
unsigned short  aLocalPort,
bool  aSecure = false,
protocol_family  aProtocolFamily = IPv4 
)
inline

Definition at line 109 of file tcp_packet_stream_server.hpp.

◆ ~tcp_packet_stream_server()

Member Function Documentation

◆ define_event()

◆ local_port()

template<typename PacketType >
unsigned short neolib::tcp_packet_stream_server< PacketType >::local_port ( ) const
inline

Definition at line 132 of file tcp_packet_stream_server.hpp.

◆ take_ownership()

Definition at line 136 of file tcp_packet_stream_server.hpp.

Member Data Documentation

◆ packet_stream_removed

template<typename PacketType >
neolib::tcp_packet_stream_server< PacketType >::packet_stream_removed

Definition at line 63 of file tcp_packet_stream_server.hpp.

◆ stream_list


The documentation for this class was generated from the following file: