4#include <system/shared_ptr.h>
5#include <system/object.h>
7#include <net/sockets/tcp_client.h>
8#include <net/sockets/socket.h>
9#include <net/ip_end_point.h>
27 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
29 ASPOSECPP_SHARED_RTTI_INFO_DECL();
64 ASPOSECPP_SHARED_API
void Start();
67 ASPOSECPP_SHARED_API
void Start(int32_t backlog);
69 ASPOSECPP_SHARED_API
void Stop();
110 bool m_ExclusiveAddressUse;
Represents a listener for the TCP network services. Objects of this class should only be allocated us...
Definition: tcp_listener.h:20
System::SharedPtr< Socket > EndAcceptSocket(System::SharedPtr< IAsyncResult > asyncResult)
Waits until the specified asynchronous accept operation completes.
TcpListener(System::SharedPtr< IPEndPoint > localEP)
Constructs a new instance.
bool get_ExclusiveAddressUse()
Gets a value that indicates if the current instance allows only one client to use a port.
System::SharedPtr< IAsyncResult > BeginAcceptTcpClient(AsyncCallback callback, System::SharedPtr< Object > state)
Initiates an asynchronous accept operation.
void Start(int32_t backlog)
Starts listening for the incoming connections.
void Start()
Starts listening for the incoming connections.
System::SharedPtr< TcpClient > AcceptTcpClient()
Accepts the pending connection request and returns the TcpClient-class instance that is used for send...
TcpListener(int32_t port)
Constructs a new instance.
System::SharedPtr< Socket > get_Server()
Returns the underlying network socket.
void Stop()
Stops listening for the incoming connections.
static System::SharedPtr< TcpListener > Create(int32_t port)
Creates a new instance using the specified port number.
void AllowNatTraversal(bool allowed)
Enables or disables the NAT traversal.
void set_ExclusiveAddressUse(bool value)
Sets a value that indicates if the current instance allows only one client to use a port.
System::SharedPtr< Socket > AcceptSocket()
Accepts the pending connection request and returns the socket that is used to send and receive data.
TcpListener(System::SharedPtr< IPAddress > localaddr, int32_t port)
Constructs a new instance.
System::SharedPtr< TcpClient > EndAcceptTcpClient(System::SharedPtr< IAsyncResult > asyncResult)
Waits until the specified asynchronous accept operation completes.
bool get_Active()
Returns a value that indicates if the current instance is actively listening for the client connectio...
System::SharedPtr< EndPoint > get_LocalEndpoint()
Returns the underlying endpoint.
bool Pending()
Returns a value that indicates if there are pending connection requests.
System::SharedPtr< IAsyncResult > BeginAcceptSocket(AsyncCallback callback, System::SharedPtr< Object > state)
Initiates an asynchronous accept operation.
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Definition: db_command.h:9
System::MulticastDelegate< void(SharedPtr< IAsyncResult >)> AsyncCallback
A delegate type that represents a method to be called when asynchronous operation completes.
Definition: async_callback.h:13