4#include <system/string.h>
5#include <system/shared_ptr.h>
6#include <system/object.h>
7#include <system/idisposable.h>
8#include <system/iasyncresult.h>
9#include <system/async_callback.h>
10#include <system/array.h>
11#include <net/sockets/socket.h>
12#include <net/sockets/address_family.h>
13#include <net/ip_end_point.h>
14#include <net/ip_address.h>
17namespace System {
namespace Net {
namespace Sockets {
31 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
33 ASPOSECPP_SHARED_RTTI_INFO_DECL();
77 ASPOSECPP_SHARED_API
void Close();
79 ASPOSECPP_SHARED_API
void Dispose()
override;
126 ASPOSECPP_SHARED_API
virtual void Dispose(
bool disposing);
132 static const int32_t MaxUDPSize;
147 void FreeResources();
157 void createClientSocket();
Defines method that releases resources owned by the current object. Objects of this class should only...
Definition: idisposable.h:30
Provides User Datagram Protocol (UDP) network services. Objects of this class should only be allocate...
Definition: udp_client.h:24
UdpClient(String hostname, int32_t port)
Creates a new instance of the UdpClient class and connects to the specified remote host on the specif...
UdpClient(AddressFamily family)
Initializes a new instance of the UdpClient class.
UdpClient(int32_t port)
Initializes a new instance of the UdpClient class.
bool get_Active()
Gets a value that indicates if the current instance is actively listening for the client connections.
void Dispose() override
Releases the managed and unmanaged resources used by the UdpClient.
UdpClient(int32_t port, AddressFamily family)
Initializes a new instance of the UdpClient class.
void Connect(String hostname, int32_t port)
Establishes a connection to the specified port on the specified host.
int32_t Send(System::ArrayPtr< uint8_t > dgram, int32_t bytes)
Sends a UDP datagram to a remote host.
int32_t Send(System::ArrayPtr< uint8_t > dgram, int32_t bytes, System::SharedPtr< IPEndPoint > endPoint)
Sends a UDP datagram to the host at the remote end point.
void set_Active(bool value)
Sets a value that indicates if the current instance is actively listening for the client connections.
void Close()
Closes the UDP connection.
int32_t Send(System::ArrayPtr< uint8_t > dgram, int32_t bytes, String hostname, int32_t port)
Sends a UDP datagram to the specified port on the specified remote host.
void set_Client(System::SharedPtr< Socket > value)
Used to provide the underlying network socket.
~UdpClient() override
Destructs the current instance.
System::ArrayPtr< uint8_t > Receive(System::SharedPtr< IPEndPoint > &remoteEP)
Returns a datagram sent by a server.
virtual void Dispose(bool disposing)
Disposes the current instance. This method also disposes the underlying socket.
System::SharedPtr< Socket > get_Client()
Used to provide the underlying network socket.
void Connect(System::SharedPtr< IPAddress > addr, int32_t port)
Establishes a connection with the host at the specified address on the specified port.
UdpClient()
Initializes a new instance of the UdpClient class.
UdpClient(System::SharedPtr< IPEndPoint > localEP)
Initializes a new instance of the UdpClient class. param local EP the local endpoint to which you bin...
void Connect(System::SharedPtr< IPEndPoint > endPoint)
Establishes a connection to a remote end point.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
AddressFamily
Enumerates the address families.
Definition: address_family.h:12
Definition: db_command.h:9