Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Base object class for DotNetDupe mirroring .NET System.Object.
Provides reference-counted and weak pointer memory management primitives ensuring zero raw ownership.
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
int Receive(char *buffer, int offset, int size)
Receives data from a bound Socket into a receive buffer.
bool Connected() const
Gets a value that indicates whether a Socket is connected to a remote host as of the last Send or Rec...
bool Poll(int microSeconds, SelectMode mode)
Determines the status of the Socket.
Socket(const Socket &)=delete
SmartPointer< Socket > Accept()
Creates a new Socket for a newly created connection.
int SendTo(const char *buffer, int offset, int size, const String &ip, int port)
Sends data to the specified endpoint.
Socket & operator=(const Socket &)=delete
int Send(const char *buffer, int offset, int size)
Sends data to a connected Socket.
void Bind(const String &ip, int port)
Associates a Socket with a local endpoint.
void Shutdown(SocketShutdown how)
Disables sends and receives on a Socket.
void * GetNativeHandle() const
Retrieves the underlying native socket descriptor.
int ReceiveFrom(char *buffer, int offset, int size, String &ip, int &port)
Receives a datagram into the data buffer and stores the endpoint.
void Listen(int backlog)
Places a Socket in a listening state.
Socket(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType)
Initializes a new instance of the Socket class using the specified address family,...
void Close()
Closes the Socket connection and releases all associated resources.
void Connect(const String &ip, int port)
Establishes a connection to a remote host.
Supports all classes in the DotNetDupe class hierarchy.
A unified smart pointer that supports both unique and shared ownership semantics.
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
SelectMode
Defines the polling modes for the Socket.Poll method.
AddressFamily
Specifies the addressing scheme that an instance of the Socket class can use.
SocketShutdown
Defines constants that are used by the Socket.Shutdown method.
ProtocolType
Specifies the protocols that the Socket class supports.
SocketType
Specifies the type of socket that an instance of the Socket class represents.
@ Unspecified
The time represented is not specified as either local time or UTC.