The Socket class implements the Berkeley sockets interface. More...
Inherits System::IDisposable.
Public Types | |
typedef std::shared_ptr< System::Details::socket_impl > | ImplPtr |
The socket implementation. More... | |
Public Types inherited from System::Object | |
typedef SmartPtr< Object > | ptr |
Alias for smart pointer type. More... | |
Public Member Functions | |
ASPOSECPP_SHARED_API int32_t | get_Available () |
ASPOSECPP_SHARED_API System::SharedPtr< EndPoint > | get_LocalEndPoint () |
ASPOSECPP_SHARED_API System::SharedPtr< EndPoint > | get_RemoteEndPoint () |
ASPOSECPP_SHARED_API bool | get_Blocking () |
ASPOSECPP_SHARED_API void | set_Blocking (bool value) |
ASPOSECPP_SHARED_API bool | get_Connected () |
ASPOSECPP_SHARED_API System::Net::Sockets::AddressFamily | get_AddressFamily () |
ASPOSECPP_SHARED_API System::Net::Sockets::SocketType | get_SocketType () |
ASPOSECPP_SHARED_API System::Net::Sockets::ProtocolType | get_ProtocolType () |
ASPOSECPP_SHARED_API bool | get_IsBound () |
ASPOSECPP_SHARED_API bool | get_ExclusiveAddressUse () |
ASPOSECPP_SHARED_API void | set_ExclusiveAddressUse (bool value) |
ASPOSECPP_SHARED_API int32_t | get_ReceiveBufferSize () |
ASPOSECPP_SHARED_API void | set_ReceiveBufferSize (int32_t value) |
ASPOSECPP_SHARED_API int32_t | get_SendBufferSize () |
ASPOSECPP_SHARED_API void | set_SendBufferSize (int32_t value) |
ASPOSECPP_SHARED_API int32_t | get_ReceiveTimeout () |
ASPOSECPP_SHARED_API void | set_ReceiveTimeout (int32_t value) |
ASPOSECPP_SHARED_API int32_t | get_SendTimeout () |
ASPOSECPP_SHARED_API void | set_SendTimeout (int32_t value) |
ASPOSECPP_SHARED_API System::SharedPtr< LingerOption > | get_LingerState () |
ASPOSECPP_SHARED_API void | set_LingerState (System::SharedPtr< LingerOption > value) |
ASPOSECPP_SHARED_API bool | get_NoDelay () |
ASPOSECPP_SHARED_API void | set_NoDelay (bool value) |
ASPOSECPP_SHARED_API int16_t | get_Ttl () |
ASPOSECPP_SHARED_API void | set_Ttl (int16_t value) |
ASPOSECPP_SHARED_API bool | get_DontFragment () |
ASPOSECPP_SHARED_API void | set_DontFragment (bool value) |
ASPOSECPP_SHARED_API bool | get_MulticastLoopback () |
ASPOSECPP_SHARED_API void | set_MulticastLoopback (bool value) |
ASPOSECPP_SHARED_API bool | get_EnableBroadcast () |
ASPOSECPP_SHARED_API void | set_EnableBroadcast (bool value) |
ASPOSECPP_SHARED_API bool | get_DualMode () |
ASPOSECPP_SHARED_API void | set_DualMode (bool value) |
ASPOSECPP_SHARED_API | Socket (System::Net::Sockets::SocketType socketType, System::Net::Sockets::ProtocolType protocolType) |
ASPOSECPP_SHARED_API | Socket (System::Net::Sockets::AddressFamily addressFamily, System::Net::Sockets::SocketType socketType, System::Net::Sockets::ProtocolType protocolType) |
ASPOSECPP_SHARED_API System::SharedPtr< IAsyncResult > | BeginSend (System::ArrayPtr< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags socketFlags, AsyncCallback callback, System::SharedPtr< Object > state) |
ASPOSECPP_SHARED_API int32_t | EndSend (System::SharedPtr< IAsyncResult > asyncResult) |
ASPOSECPP_SHARED_API int32_t | EndSend (System::SharedPtr< IAsyncResult > asyncResult, SocketError &errorCode) |
ASPOSECPP_SHARED_API System::SharedPtr< IAsyncResult > | BeginReceive (System::ArrayPtr< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags socketFlags, AsyncCallback callback, System::SharedPtr< Object > state) |
ASPOSECPP_SHARED_API int32_t | EndReceive (System::SharedPtr< IAsyncResult > asyncResult) |
ASPOSECPP_SHARED_API int32_t | EndReceive (System::SharedPtr< IAsyncResult > asyncResult, SocketError &errorCode) |
ASPOSECPP_SHARED_API void | Bind (System::SharedPtr< EndPoint > localEP) |
ASPOSECPP_SHARED_API void | Connect (System::SharedPtr< EndPoint > remoteEP) |
ASPOSECPP_SHARED_API void | Connect (System::SharedPtr< IPAddress > address, int32_t port) |
ASPOSECPP_SHARED_API void | Connect (String host, int32_t port) |
ASPOSECPP_SHARED_API void | Connect (System::ArrayPtr< System::SharedPtr< IPAddress >> addresses, int32_t port) |
ASPOSECPP_SHARED_API System::SharedPtr< IAsyncResult > | BeginConnect (System::SharedPtr< EndPoint > remoteEP, AsyncCallback callback, System::SharedPtr< Object > state) |
ASPOSECPP_SHARED_API System::SharedPtr< IAsyncResult > | BeginConnect (String host, int32_t port, AsyncCallback requestCallback, System::SharedPtr< Object > state) |
ASPOSECPP_SHARED_API System::SharedPtr< IAsyncResult > | BeginConnect (System::SharedPtr< IPAddress > address, int32_t port, AsyncCallback requestCallback, System::SharedPtr< Object > state) |
ASPOSECPP_SHARED_API System::SharedPtr< IAsyncResult > | BeginConnect (System::ArrayPtr< System::SharedPtr< IPAddress >> addresses, int32_t port, AsyncCallback requestCallback, System::SharedPtr< Object > state) |
ASPOSECPP_SHARED_API void | Close () |
Closes the socket connection. More... | |
ASPOSECPP_SHARED_API void | Close (int timeout) |
ASPOSECPP_SHARED_API void | EndConnect (System::SharedPtr< IAsyncResult > asyncResult) |
ASPOSECPP_SHARED_API void | Listen (int32_t backlog) |
ASPOSECPP_SHARED_API System::SharedPtr< Socket > | Accept () |
ASPOSECPP_SHARED_API int32_t | Send (System::ArrayPtr< uint8_t > buffer, int32_t size, SocketFlags socketFlags) |
ASPOSECPP_SHARED_API int32_t | Send (System::Details::ArrayView< uint8_t > buffer, int32_t size, SocketFlags socketFlags) |
template<std::size_t N> | |
int32_t | Send (System::Details::StackArray< uint8_t, N > &buffer, int32_t size, SocketFlags socketFlags) |
ASPOSECPP_SHARED_API int32_t | Send (System::ArrayPtr< uint8_t > buffer, SocketFlags socketFlags) |
ASPOSECPP_SHARED_API int32_t | Send (System::Details::ArrayView< uint8_t > buffer, SocketFlags socketFlags) |
template<std::size_t N> | |
int32_t | Send (System::Details::StackArray< uint8_t, N > &buffer, SocketFlags socketFlags) |
ASPOSECPP_SHARED_API int32_t | Send (System::ArrayPtr< uint8_t > buffer) |
ASPOSECPP_SHARED_API int32_t | Send (System::Details::ArrayView< uint8_t > buffer) |
template<std::size_t N> | |
int32_t | Send (System::Details::StackArray< uint8_t, N > &buffer) |
ASPOSECPP_SHARED_API int32_t | Send (System::SharedPtr< Collections::Generic::IList< ArraySegment< uint8_t >>> buffers) |
ASPOSECPP_SHARED_API int32_t | Send (System::SharedPtr< Collections::Generic::IList< ArraySegment< uint8_t >>> buffers, SocketFlags socketFlags) |
ASPOSECPP_SHARED_API int32_t | Send (System::SharedPtr< Collections::Generic::IList< ArraySegment< uint8_t >>> buffers, SocketFlags socketFlags, SocketError &errorCode) |
ASPOSECPP_SHARED_API int32_t | Send (System::ArrayPtr< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags socketFlags) |
ASPOSECPP_SHARED_API int32_t | Send (System::Details::ArrayView< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags socketFlags) |
template<std::size_t N> | |
int32_t | Send (System::Details::StackArray< uint8_t, N > &buffer, int32_t offset, int32_t size, SocketFlags socketFlags) |
ASPOSECPP_SHARED_API int32_t | Send (System::ArrayPtr< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags socketFlags, SocketError &errorCode) |
ASPOSECPP_SHARED_API int32_t | Send (System::Details::ArrayView< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags socketFlags, SocketError &errorCode) |
template<std::size_t N> | |
int32_t | Send (System::Details::StackArray< uint8_t, N > &buffer, int32_t offset, int32_t size, SocketFlags socketFlags, SocketError &errorCode) |
ASPOSECPP_SHARED_API int32_t | SendTo (System::ArrayPtr< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags socketFlags, System::SharedPtr< EndPoint > remoteEP) |
ASPOSECPP_SHARED_API int32_t | SendTo (System::Details::ArrayView< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags socketFlags, System::SharedPtr< EndPoint > remoteEP) |
template<std::size_t N> | |
int32_t | SendTo (System::Details::StackArray< uint8_t, N > &buffer, int32_t offset, int32_t size, SocketFlags socketFlags, System::SharedPtr< EndPoint > remoteEP) |
ASPOSECPP_SHARED_API int32_t | SendTo (System::ArrayPtr< uint8_t > buffer, int32_t size, SocketFlags socketFlags, System::SharedPtr< EndPoint > remoteEP) |
ASPOSECPP_SHARED_API int32_t | SendTo (System::Details::ArrayView< uint8_t > buffer, int32_t size, SocketFlags socketFlags, System::SharedPtr< EndPoint > remoteEP) |
template<std::size_t N> | |
int32_t | SendTo (System::Details::StackArray< uint8_t, N > &buffer, int32_t size, SocketFlags socketFlags, System::SharedPtr< EndPoint > remoteEP) |
ASPOSECPP_SHARED_API int32_t | SendTo (System::ArrayPtr< uint8_t > buffer, SocketFlags socketFlags, System::SharedPtr< EndPoint > remoteEP) |
ASPOSECPP_SHARED_API int32_t | SendTo (System::Details::ArrayView< uint8_t > buffer, SocketFlags socketFlags, System::SharedPtr< EndPoint > remoteEP) |
template<std::size_t N> | |
int32_t | SendTo (System::Details::StackArray< uint8_t, N > &buffer, SocketFlags socketFlags, System::SharedPtr< EndPoint > remoteEP) |
ASPOSECPP_SHARED_API int32_t | SendTo (System::ArrayPtr< uint8_t > buffer, System::SharedPtr< EndPoint > remoteEP) |
ASPOSECPP_SHARED_API int32_t | SendTo (System::Details::ArrayView< uint8_t > buffer, System::SharedPtr< EndPoint > remoteEP) |
template<std::size_t N> | |
int32_t | SendTo (System::Details::StackArray< uint8_t, N > &buffer, System::SharedPtr< EndPoint > remoteEP) |
ASPOSECPP_SHARED_API int32_t | Receive (System::ArrayPtr< uint8_t > buffer, int32_t size, SocketFlags socketFlags) |
ASPOSECPP_SHARED_API int32_t | Receive (System::Details::ArrayView< uint8_t > buffer, int32_t size, SocketFlags socketFlags) |
template<std::size_t N> | |
int32_t | Receive (System::Details::StackArray< uint8_t, N > &buffer, int32_t size, SocketFlags socketFlags) |
ASPOSECPP_SHARED_API int32_t | Receive (System::ArrayPtr< uint8_t > buffer, SocketFlags socketFlags) |
ASPOSECPP_SHARED_API int32_t | Receive (System::Details::ArrayView< uint8_t > buffer, SocketFlags socketFlags) |
template<std::size_t N> | |
int32_t | Receive (System::Details::StackArray< uint8_t, N > &buffer, SocketFlags socketFlags) |
ASPOSECPP_SHARED_API int32_t | Receive (System::ArrayPtr< uint8_t > buffer) |
ASPOSECPP_SHARED_API int32_t | Receive (System::Details::ArrayView< uint8_t > buffer) |
template<std::size_t N> | |
int32_t | Receive (System::Details::StackArray< uint8_t, N > &buffer) |
ASPOSECPP_SHARED_API int32_t | Receive (System::ArrayPtr< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags socketFlags) |
ASPOSECPP_SHARED_API int32_t | Receive (System::Details::ArrayView< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags socketFlags) |
template<std::size_t N> | |
int32_t | Receive (System::Details::StackArray< uint8_t, N > &buffer, int32_t offset, int32_t size, SocketFlags socketFlags) |
ASPOSECPP_SHARED_API int32_t | Receive (System::ArrayPtr< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags socketFlags, SocketError &errorCode) |
ASPOSECPP_SHARED_API int32_t | Receive (System::Details::ArrayView< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags socketFlags, SocketError &errorCode) |
template<std::size_t N> | |
int32_t | Receive (System::Details::StackArray< uint8_t, N > &buffer, int32_t offset, int32_t size, SocketFlags socketFlags, SocketError &errorCode) |
ASPOSECPP_SHARED_API int32_t | Receive (System::SharedPtr< Collections::Generic::IList< ArraySegment< uint8_t >>> buffers) |
ASPOSECPP_SHARED_API int32_t | Receive (System::SharedPtr< Collections::Generic::IList< ArraySegment< uint8_t >>> buffers, SocketFlags socketFlags) |
ASPOSECPP_SHARED_API int32_t | Receive (System::SharedPtr< Collections::Generic::IList< ArraySegment< uint8_t >>> buffers, SocketFlags socketFlags, SocketError &errorCode) |
ASPOSECPP_SHARED_API int32_t | ReceiveMessageFrom (System::ArrayPtr< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags &socketFlags, System::SharedPtr< EndPoint > &remoteEP, IPPacketInformation &ipPacketInformation) |
ASPOSECPP_SHARED_API int32_t | ReceiveMessageFrom (System::Details::ArrayView< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags &socketFlags, System::SharedPtr< EndPoint > &remoteEP, IPPacketInformation &ipPacketInformation) |
template<std::size_t N> | |
int32_t | ReceiveMessageFrom (System::Details::StackArray< uint8_t, N > &buffer, int32_t offset, int32_t size, SocketFlags &socketFlags, System::SharedPtr< EndPoint > &remoteEP, IPPacketInformation &ipPacketInformation) |
ASPOSECPP_SHARED_API int32_t | ReceiveFrom (System::ArrayPtr< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags socketFlags, System::SharedPtr< EndPoint > &remoteEP) |
ASPOSECPP_SHARED_API int32_t | ReceiveFrom (System::Details::ArrayView< uint8_t > buffer, int32_t offset, int32_t size, SocketFlags socketFlags, System::SharedPtr< EndPoint > &remoteEP) |
template<std::size_t N> | |
int32_t | ReceiveFrom (System::Details::StackArray< uint8_t, N > &buffer, int32_t offset, int32_t size, SocketFlags socketFlags, System::SharedPtr< EndPoint > &remoteEP) |
ASPOSECPP_SHARED_API int32_t | ReceiveFrom (System::ArrayPtr< uint8_t > buffer, int32_t size, SocketFlags socketFlags, System::SharedPtr< EndPoint > &remoteEP) |
ASPOSECPP_SHARED_API int32_t | ReceiveFrom (System::Details::ArrayView< uint8_t > buffer, int32_t size, SocketFlags socketFlags, System::SharedPtr< EndPoint > &remoteEP) |
template<std::size_t N> | |
int32_t | ReceiveFrom (System::Details::StackArray< uint8_t, N > &buffer, int32_t size, SocketFlags socketFlags, System::SharedPtr< EndPoint > &remoteEP) |
ASPOSECPP_SHARED_API int32_t | ReceiveFrom (System::ArrayPtr< uint8_t > buffer, SocketFlags socketFlags, System::SharedPtr< EndPoint > &remoteEP) |
ASPOSECPP_SHARED_API int32_t | ReceiveFrom (System::Details::ArrayView< uint8_t > buffer, SocketFlags socketFlags, System::SharedPtr< EndPoint > &remoteEP) |
template<std::size_t N> | |
int32_t | ReceiveFrom (System::ArrayPtr< uint8_t > buffer, SocketFlags socketFlags, System::SharedPtr< EndPoint > &remoteEP) |
ASPOSECPP_SHARED_API int32_t | ReceiveFrom (System::ArrayPtr< uint8_t > buffer, System::SharedPtr< EndPoint > &remoteEP) |
ASPOSECPP_SHARED_API int32_t | ReceiveFrom (System::Details::ArrayView< uint8_t > buffer, System::SharedPtr< EndPoint > &remoteEP) |
template<std::size_t N> | |
int32_t | ReceiveFrom (System::Details::StackArray< uint8_t, N > &buffer, System::SharedPtr< EndPoint > &remoteEP) |
ASPOSECPP_SHARED_API int32_t | IOControl (int32_t ioControlCode, System::ArrayPtr< uint8_t > optionInValue, System::ArrayPtr< uint8_t > optionOutValue) |
ASPOSECPP_SHARED_API int32_t | IOControl (IOControlCode ioControlCode, System::ArrayPtr< uint8_t > optionInValue, System::ArrayPtr< uint8_t > optionOutValue) |
ASPOSECPP_SHARED_API void | SetSocketOption (SocketOptionLevel optionLevel, SocketOptionName optionName, int32_t optionValue) |
ASPOSECPP_SHARED_API void | SetSocketOption (SocketOptionLevel optionLevel, SocketOptionName optionName, System::ArrayPtr< uint8_t > optionValue) |
ASPOSECPP_SHARED_API void | SetSocketOption (SocketOptionLevel optionLevel, SocketOptionName optionName, bool optionValue) |
ASPOSECPP_SHARED_API void | SetSocketOption (SocketOptionLevel optionLevel, SocketOptionName optionName, System::SharedPtr< Object > optionValue) |
ASPOSECPP_SHARED_API System::SharedPtr< Object > | GetSocketOption (SocketOptionLevel optionLevel, SocketOptionName optionName) |
ASPOSECPP_SHARED_API void | GetSocketOption (SocketOptionLevel optionLevel, SocketOptionName optionName, System::ArrayPtr< uint8_t > optionValue) |
ASPOSECPP_SHARED_API System::ArrayPtr< uint8_t > | GetSocketOption (SocketOptionLevel optionLevel, SocketOptionName optionName, int32_t optionLength) |
ASPOSECPP_SHARED_API bool | Poll (int32_t microSeconds, SelectMode mode) |
ASPOSECPP_SHARED_API void | Shutdown (SocketShutdown how) |
ASPOSECPP_SHARED_API void | Dispose () override |
Does nothing. More... | |
virtual ASPOSECPP_SHARED_API | ~Socket () |
Destructs the current instance. More... | |
ImplPtr | GetImpl () const |
Returns a pointer to implementation. More... | |
ASPOSECPP_SHARED_API void | set_ConnectionTimeout (int32_t value) |
Public Member Functions inherited from System::Object | |
ASPOSECPP_SHARED_API | Object () |
Creates object. Initializes all internal data structures. More... | |
virtual ASPOSECPP_SHARED_API | ~Object () |
Destroys object. Frees all internal data structures. More... | |
ASPOSECPP_SHARED_API | Object (Object const &x) |
Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object & | operator= (Object const &x) |
Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object * | SharedRefAdded () |
Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
int | SharedRefRemovedSafe () |
Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
int | RemovedSharedRefs (int count) |
Decreases shared reference count by specified value. More... | |
Detail::SmartPtrCounter * | WeakRefAdded () |
Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
void | WeakRefRemoved () |
Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
Detail::SmartPtrCounter * | GetCounter () |
Gets reference counter data structure associated with the object. More... | |
int | SharedCount () const |
Gets current value of shared reference counter. More... | |
ASPOSECPP_SHARED_API void | Lock () |
Implements C# lock() statement locking. Call directly or use LockContext sentry object. More... | |
ASPOSECPP_SHARED_API void | Unlock () |
Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More... | |
virtual ASPOSECPP_SHARED_API bool | Equals (ptr obj) |
Compares objects using C# Object.Equals semantics. More... | |
virtual ASPOSECPP_SHARED_API int32_t | GetHashCode () const |
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More... | |
virtual ASPOSECPP_SHARED_API String | ToString () const |
Analog of C# Object.ToString() method. Enables converting custom objects to string. More... | |
virtual ASPOSECPP_SHARED_API ptr | MemberwiseClone () const |
Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More... | |
virtual ASPOSECPP_SHARED_API const TypeInfo & | GetType () const |
Gets actual type of object. Analog of C# System.Object.GetType() call. More... | |
virtual ASPOSECPP_SHARED_API bool | Is (const TypeInfo &targetType) const |
Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More... | |
virtual ASPOSECPP_SHARED_API void | SetTemplateWeakPtr (uint32_t argument) |
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More... | |
virtual ASPOSECPP_SHARED_API bool | FastCast (const Details::FastRttiBase &helper, void **out_ptr) const |
For internal purposes only. More... | |
template<> | |
bool | Equals (float const &objA, float const &objB) |
template<> | |
bool | Equals (double const &objA, double const &objB) |
template<> | |
bool | ReferenceEquals (String const &str, std::nullptr_t) |
template<> | |
bool | ReferenceEquals (String const &str1, String const &str2) |
Static Public Member Functions | |
static ASPOSECPP_SHARED_API bool | get_SupportsIPv4 () |
static ASPOSECPP_SHARED_API bool | get_OSSupportsIPv4 () |
static ASPOSECPP_SHARED_API bool | get_OSSupportsIPv6 () |
Static Public Member Functions inherited from System::Object | |
static bool | ReferenceEquals (ptr const &objA, ptr const &objB) |
Compares objects by reference. More... | |
template<typename T > | |
static std::enable_if<!IsSmartPtr< T >::value, bool >::type | ReferenceEquals (T const &objA, T const &objB) |
Compares objects by reference. More... | |
template<typename T > | |
static std::enable_if<!IsSmartPtr< T >::value, bool >::type | ReferenceEquals (T const &objA, std::nullptr_t) |
Reference-compares value type object with nullptr. More... | |
template<typename T1 , typename T2 > | |
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type | Equals (T1 const &objA, T2 const &objB) |
Compares reference type objects in C# style. More... | |
template<typename T1 , typename T2 > | |
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type | Equals (T1 const &objA, T2 const &objB) |
Compares value type objects in C# style. More... | |
static const TypeInfo & | Type () |
Implements C# typeof(System.Object) construct. More... | |
The Socket class implements the Berkeley sockets interface.
typedef std::shared_ptr<System::Details::socket_impl> System::Net::Sockets::Socket::ImplPtr |
The socket implementation.
ASPOSECPP_SHARED_API System::Net::Sockets::Socket::Socket | ( | System::Net::Sockets::SocketType | socketType, |
System::Net::Sockets::ProtocolType | protocolType | ||
) |
Constructs a new instance.
socketType | The socket type. |
protocolType | The protocol type. |
ASPOSECPP_SHARED_API System::Net::Sockets::Socket::Socket | ( | System::Net::Sockets::AddressFamily | addressFamily, |
System::Net::Sockets::SocketType | socketType, | ||
System::Net::Sockets::ProtocolType | protocolType | ||
) |
Constructs a new instance.
addressFamily | The address family. |
socketType | The socket type. |
protocolType | The protocol type. |
|
virtual |
Destructs the current instance.
ASPOSECPP_SHARED_API System::SharedPtr<Socket> System::Net::Sockets::Socket::Accept | ( | ) |
Creates a new socket for the newly created connection.
ASPOSECPP_SHARED_API System::SharedPtr<IAsyncResult> System::Net::Sockets::Socket::BeginConnect | ( | System::SharedPtr< EndPoint > | remoteEP, |
AsyncCallback | callback, | ||
System::SharedPtr< Object > | state | ||
) |
Initiates an asynchronous connect operation.
remoteEP | The remote endpoint. |
callback | A callback that will be called when the operation completes. |
state | User-provided data used to uniquely identify each asynchronous connect operation. |
ASPOSECPP_SHARED_API System::SharedPtr<IAsyncResult> System::Net::Sockets::Socket::BeginConnect | ( | String | host, |
int32_t | port, | ||
AsyncCallback | requestCallback, | ||
System::SharedPtr< Object > | state | ||
) |
Initiates an asynchronous connect operation.
host | The remote host name. |
port | The port number of the remote host. |
requestCallback | A callback that will be called when the operation completes. |
state | User-provided data used to uniquely identify each asynchronous connect operation. |
ASPOSECPP_SHARED_API System::SharedPtr<IAsyncResult> System::Net::Sockets::Socket::BeginConnect | ( | System::SharedPtr< IPAddress > | address, |
int32_t | port, | ||
AsyncCallback | requestCallback, | ||
System::SharedPtr< Object > | state | ||
) |
Initiates an asynchronous connect operation.
address | The remote host IP address. |
port | The port number of the remote host. |
requestCallback | A callback that will be called when the operation completes. |
state | User-provided data used to uniquely identify each asynchronous connect operation. |
ASPOSECPP_SHARED_API System::SharedPtr<IAsyncResult> System::Net::Sockets::Socket::BeginConnect | ( | System::ArrayPtr< System::SharedPtr< IPAddress >> | addresses, |
int32_t | port, | ||
AsyncCallback | requestCallback, | ||
System::SharedPtr< Object > | state | ||
) |
Initiates an asynchronous connect operation.
addresses | The IP addresses of the remote host. |
port | The port number of the remote host. |
requestCallback | A callback that will be called when the operation completes. |
state | User-provided data used to uniquely identify each asynchronous connect operation. |
ASPOSECPP_SHARED_API System::SharedPtr<IAsyncResult> System::Net::Sockets::Socket::BeginReceive | ( | System::ArrayPtr< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags | socketFlags, | ||
AsyncCallback | callback, | ||
System::SharedPtr< Object > | state | ||
) |
Initiates an asynchronous write operation.
buffer | A buffer where the received data will be assigned. |
offset | The offset in bytes in the specified array. |
size | The number of bytes in the specified array starting from the 'offset' parameter. |
socketFlags | The receive behaviour. |
callback | A callback that will be called when the operation completes. |
state | User-provided data used to uniquely identify each asynchronous receive operation. |
ASPOSECPP_SHARED_API System::SharedPtr<IAsyncResult> System::Net::Sockets::Socket::BeginSend | ( | System::ArrayPtr< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags | socketFlags, | ||
AsyncCallback | callback, | ||
System::SharedPtr< Object > | state | ||
) |
Initiates an asynchronous send operation.
buffer | A buffer to read data from. |
offset | The offset in bytes in the specified array. |
size | The number of bytes in the specified array starting from the 'offset' parameter. |
socketFlags | The send behaviour. |
callback | A callback that will be called when the operation completes. |
state | User-provided data used to uniquely identify each asynchronous send operation. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::Bind | ( | System::SharedPtr< EndPoint > | localEP | ) |
Binds the socket with to the specified local endpoint.
localEP | The local endpoint to which the socket is bound. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::Close | ( | ) |
Closes the socket connection.
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::Close | ( | int | timeout | ) |
Closes the socket connection with the specified timeout to allow queued data to be sent.
timeout | A number of milliseconds to wait. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::Connect | ( | System::SharedPtr< EndPoint > | remoteEP | ) |
Establishes a connection to the specified remote endpoint.
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::Connect | ( | System::SharedPtr< IPAddress > | address, |
int32_t | port | ||
) |
Establishes a connection to the specified remote endpoint.
address | The remote host IP address. |
port | The port number of the remote host. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::Connect | ( | String | host, |
int32_t | port | ||
) |
Establishes a connection to the specified remote endpoint.
host | The remote host name. |
port | The port number of the remote host. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::Connect | ( | System::ArrayPtr< System::SharedPtr< IPAddress >> | addresses, |
int32_t | port | ||
) |
Establishes a connection to the specified remote endpoint.
addresses | The IP addresses of the remote host. |
port | The port number of the remote host. |
|
overridevirtual |
Does nothing.
Reimplemented from System::IDisposable.
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::EndConnect | ( | System::SharedPtr< IAsyncResult > | asyncResult | ) |
Waits until the specified asynchronous connect operation completes.
asyncResult | An IAsyncResult object that represents an asynchronous connect operation. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::EndReceive | ( | System::SharedPtr< IAsyncResult > | asyncResult | ) |
Waits until the specified asynchronous receive operation completes.
asyncResult | An IAsyncResult object that represents an asynchronous receive operation. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::EndReceive | ( | System::SharedPtr< IAsyncResult > | asyncResult, |
SocketError & | errorCode | ||
) |
Waits until the specified asynchronous receive operation completes.
asyncResult | An IAsyncResult object that represents an asynchronous receive operation. |
errorCode | The output parameter where the error code will be assigned when the receive operation fails. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::EndSend | ( | System::SharedPtr< IAsyncResult > | asyncResult | ) |
Waits until the specified asynchronous send operation completes.
asyncResult | An IAsyncResult object that represents an asynchronous send operation. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::EndSend | ( | System::SharedPtr< IAsyncResult > | asyncResult, |
SocketError & | errorCode | ||
) |
Waits until the specified asynchronous send operation completes.
asyncResult | An IAsyncResult object that represents an asynchronous send operation. |
errorCode | The output parameter where the error code will be assigned when the send operation fails. |
ASPOSECPP_SHARED_API System::Net::Sockets::AddressFamily System::Net::Sockets::Socket::get_AddressFamily | ( | ) |
Returns the address family.
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::get_Available | ( | ) |
Gets the number of bytes received from the network and available for reading.
ASPOSECPP_SHARED_API bool System::Net::Sockets::Socket::get_Blocking | ( | ) |
Gets a value that indicates if the socket is in the blocking mode.
ASPOSECPP_SHARED_API bool System::Net::Sockets::Socket::get_Connected | ( | ) |
Returns a value that indicates if the socket is connected to the remote host.
ASPOSECPP_SHARED_API bool System::Net::Sockets::Socket::get_DontFragment | ( | ) |
Gets a value that indicates if the socket allows IP datagrams to be fragmented.
ASPOSECPP_SHARED_API bool System::Net::Sockets::Socket::get_DualMode | ( | ) |
Gets a value indicates if the socket is in the dual-mode.
ASPOSECPP_SHARED_API bool System::Net::Sockets::Socket::get_EnableBroadcast | ( | ) |
Gets a value that indicates if the socket allows broadcast packets.
ASPOSECPP_SHARED_API bool System::Net::Sockets::Socket::get_ExclusiveAddressUse | ( | ) |
Gets a value that indicates if only one process can bind the socket to a port.
ASPOSECPP_SHARED_API bool System::Net::Sockets::Socket::get_IsBound | ( | ) |
Returns a value that indicates if the socket is bound to a specific local port.
ASPOSECPP_SHARED_API System::SharedPtr<LingerOption> System::Net::Sockets::Socket::get_LingerState | ( | ) |
Gets a value that indicates if the socket will delay closing in an attempt to send all pending data.
ASPOSECPP_SHARED_API System::SharedPtr<EndPoint> System::Net::Sockets::Socket::get_LocalEndPoint | ( | ) |
Returns the local endpoint.
ASPOSECPP_SHARED_API bool System::Net::Sockets::Socket::get_MulticastLoopback | ( | ) |
Gets a value that indicates if the socket receives outgoing multicast packets.
ASPOSECPP_SHARED_API bool System::Net::Sockets::Socket::get_NoDelay | ( | ) |
Gets a value that indicates if the socket is using the Nagle algorithm.
|
static |
Returns a value that indicates if the operating system and network adaptors support IPv4.
|
static |
Returns a value that indicates if the operating system and network adaptors support IPv6.
ASPOSECPP_SHARED_API System::Net::Sockets::ProtocolType System::Net::Sockets::Socket::get_ProtocolType | ( | ) |
Returns the protocol type.
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::get_ReceiveBufferSize | ( | ) |
Gets the receive buffer size.
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::get_ReceiveTimeout | ( | ) |
Gets a period after which a 'Receive' call will time out.
ASPOSECPP_SHARED_API System::SharedPtr<EndPoint> System::Net::Sockets::Socket::get_RemoteEndPoint | ( | ) |
Returns the remote endpoint.
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::get_SendBufferSize | ( | ) |
Gets the send buffer size.
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::get_SendTimeout | ( | ) |
Gets a period after which a 'Send' call will time out.
ASPOSECPP_SHARED_API System::Net::Sockets::SocketType System::Net::Sockets::Socket::get_SocketType | ( | ) |
Returns the socket type.
|
static |
Returns a value that indicates if the current host supports IPv4.
ASPOSECPP_SHARED_API int16_t System::Net::Sockets::Socket::get_Ttl | ( | ) |
Gets the TTL value.
ImplPtr System::Net::Sockets::Socket::GetImpl | ( | ) | const |
Returns a pointer to implementation.
ASPOSECPP_SHARED_API System::SharedPtr<Object> System::Net::Sockets::Socket::GetSocketOption | ( | SocketOptionLevel | optionLevel, |
SocketOptionName | optionName | ||
) |
Returns the value that corresponds to the specified option name.
optionLevel | The socket option level. |
optionName | The option name. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::GetSocketOption | ( | SocketOptionLevel | optionLevel, |
SocketOptionName | optionName, | ||
System::ArrayPtr< uint8_t > | optionValue | ||
) |
Gets the value that corresponds to the specified option name.
optionLevel | The socket option level. |
optionName | The option name. |
optionValue | The output parameter where the corresponding value will be assigned. |
ASPOSECPP_SHARED_API System::ArrayPtr<uint8_t> System::Net::Sockets::Socket::GetSocketOption | ( | SocketOptionLevel | optionLevel, |
SocketOptionName | optionName, | ||
int32_t | optionLength | ||
) |
Returns the value that corresponds to the specified option name.
optionLevel | The socket option level. |
optionName | The option name. |
optionLength | The option length. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::IOControl | ( | int32_t | ioControlCode, |
System::ArrayPtr< uint8_t > | optionInValue, | ||
System::ArrayPtr< uint8_t > | optionOutValue | ||
) |
Sets low-level operating modes for the socket.
ioControlCode | The control code of the operation to perform. |
optionInValue | The byte array that contains the input data. |
optionOutValue | The byte array that contains the output data. |
optionOutValue
parameter. ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::IOControl | ( | IOControlCode | ioControlCode, |
System::ArrayPtr< uint8_t > | optionInValue, | ||
System::ArrayPtr< uint8_t > | optionOutValue | ||
) |
Sets low-level operating modes for the socket.
ioControlCode | The control code of the operation to perform. |
optionInValue | The byte array that contains the input data. |
optionOutValue | The byte array that contains the output data. |
optionOutValue
parameter. ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::Listen | ( | int32_t | backlog | ) |
Changes the socket state to 'listen'.
backlog | The maximum number of pending connections. |
ASPOSECPP_SHARED_API bool System::Net::Sockets::Socket::Poll | ( | int32_t | microSeconds, |
SelectMode | mode | ||
) |
Returns the status of the socket based on the specified polling mode.
microSeconds | The amount of time in milliseconds to wait for a response. |
mode | The polling mode. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Receive | ( | System::ArrayPtr< uint8_t > | buffer, |
int32_t | size, | ||
SocketFlags | socketFlags | ||
) |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
size | The number of bytes to receive. |
socketFlags | The receive behavior. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Receive | ( | System::Details::ArrayView< uint8_t > | buffer, |
int32_t | size, | ||
SocketFlags | socketFlags | ||
) |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
size | The number of bytes to receive. |
socketFlags | The receive behavior. |
|
inline |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
size | The number of bytes to receive. |
socketFlags | The receive behavior. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Receive | ( | System::ArrayPtr< uint8_t > | buffer, |
SocketFlags | socketFlags | ||
) |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
socketFlags | The receive behavior. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Receive | ( | System::Details::ArrayView< uint8_t > | buffer, |
SocketFlags | socketFlags | ||
) |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
socketFlags | The receive behavior. |
|
inline |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
socketFlags | The receive behavior. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Receive | ( | System::ArrayPtr< uint8_t > | buffer | ) |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Receive | ( | System::Details::ArrayView< uint8_t > | buffer | ) |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
|
inline |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Receive | ( | System::ArrayPtr< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags | socketFlags | ||
) |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
offset | The offset in bytes in the specified array. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Receive | ( | System::Details::ArrayView< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags | socketFlags | ||
) |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
offset | The offset in bytes in the specified array. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
|
inline |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
offset | The offset in bytes in the specified array. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Receive | ( | System::ArrayPtr< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags | socketFlags, | ||
SocketError & | errorCode | ||
) |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
offset | The offset in bytes in the specified array. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
errorCode | The output parameter where the error code will be assigned when the receive operation fails. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Receive | ( | System::Details::ArrayView< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags | socketFlags, | ||
SocketError & | errorCode | ||
) |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
offset | The offset in bytes in the specified array. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
errorCode | The output parameter where the error code will be assigned when the receive operation fails. |
|
inline |
Receives data from the socket and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
offset | The offset in bytes in the specified array. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
errorCode | The output parameter where the error code will be assigned when the receive operation fails. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Receive | ( | System::SharedPtr< Collections::Generic::IList< ArraySegment< uint8_t >>> | buffers | ) |
Receives data from the socket and writes it to the specified byte arrays.
buffers | The byte arrays where the received data will be assigned. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Receive | ( | System::SharedPtr< Collections::Generic::IList< ArraySegment< uint8_t >>> | buffers, |
SocketFlags | socketFlags | ||
) |
Receives data from the socket and writes it to the specified byte arrays.
buffers | The byte arrays where the received data will be assigned. |
socketFlags | The receive behaviour. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Receive | ( | System::SharedPtr< Collections::Generic::IList< ArraySegment< uint8_t >>> | buffers, |
SocketFlags | socketFlags, | ||
SocketError & | errorCode | ||
) |
Receives data from the socket and writes it to the specified byte arrays.
buffers | The byte arrays where the received data will be assigned. |
socketFlags | The receive behaviour. |
errorCode | The output parameter where the error code will be assigned when the receive operation fails. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::ReceiveFrom | ( | System::ArrayPtr< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags | socketFlags, | ||
System::SharedPtr< EndPoint > & | remoteEP | ||
) |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
offset | The offset in bytes in the specified array. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::ReceiveFrom | ( | System::Details::ArrayView< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags | socketFlags, | ||
System::SharedPtr< EndPoint > & | remoteEP | ||
) |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
offset | The offset in bytes in the specified array. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
remoteEP | The remote endpoint. |
|
inline |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
offset | The offset in bytes in the specified array. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::ReceiveFrom | ( | System::ArrayPtr< uint8_t > | buffer, |
int32_t | size, | ||
SocketFlags | socketFlags, | ||
System::SharedPtr< EndPoint > & | remoteEP | ||
) |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::ReceiveFrom | ( | System::Details::ArrayView< uint8_t > | buffer, |
int32_t | size, | ||
SocketFlags | socketFlags, | ||
System::SharedPtr< EndPoint > & | remoteEP | ||
) |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
remoteEP | The remote endpoint. |
|
inline |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::ReceiveFrom | ( | System::ArrayPtr< uint8_t > | buffer, |
SocketFlags | socketFlags, | ||
System::SharedPtr< EndPoint > & | remoteEP | ||
) |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
socketFlags | The receive behavior. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::ReceiveFrom | ( | System::Details::ArrayView< uint8_t > | buffer, |
SocketFlags | socketFlags, | ||
System::SharedPtr< EndPoint > & | remoteEP | ||
) |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
socketFlags | The receive behavior. |
remoteEP | The remote endpoint. |
|
inline |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
socketFlags | The receive behavior. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::ReceiveFrom | ( | System::ArrayPtr< uint8_t > | buffer, |
System::SharedPtr< EndPoint > & | remoteEP | ||
) |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::ReceiveFrom | ( | System::Details::ArrayView< uint8_t > | buffer, |
System::SharedPtr< EndPoint > & | remoteEP | ||
) |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
remoteEP | The remote endpoint. |
|
inline |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::ReceiveMessageFrom | ( | System::ArrayPtr< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags & | socketFlags, | ||
System::SharedPtr< EndPoint > & | remoteEP, | ||
IPPacketInformation & | ipPacketInformation | ||
) |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
offset | The offset in bytes in the specified array. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
remoteEP | The remote endpoint. |
ipPacketInformation | The output parameter where information about the packet will be assigned. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::ReceiveMessageFrom | ( | System::Details::ArrayView< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags & | socketFlags, | ||
System::SharedPtr< EndPoint > & | remoteEP, | ||
IPPacketInformation & | ipPacketInformation | ||
) |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
offset | The offset in bytes in the specified array. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
remoteEP | The remote endpoint. |
ipPacketInformation | The output parameter where information about the packet will be assigned. |
|
inline |
Receives data from the specified endpoint and writes it to the specified byte array.
buffer | The byte array where the received data will be assigned. |
offset | The offset in bytes in the specified array. |
size | The number of bytes to receive that will be assigned to the specified byte array from the 'offset' index. |
socketFlags | The receive behavior. |
remoteEP | The remote endpoint. |
ipPacketInformation | The output parameter where information about the packet will be assigned. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Send | ( | System::ArrayPtr< uint8_t > | buffer, |
int32_t | size, | ||
SocketFlags | socketFlags | ||
) |
Sends the specified data to the socket.
buffer | The data to send. |
size | The number of bytes from the specified data that must be send. |
socketFlags | The send behavior. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Send | ( | System::Details::ArrayView< uint8_t > | buffer, |
int32_t | size, | ||
SocketFlags | socketFlags | ||
) |
Sends the specified data to the socket.
buffer | The data to send. |
size | The number of bytes from the specified data that must be send. |
socketFlags | The send behavior. |
|
inline |
Sends the specified data to the socket.
buffer | The data to send. |
size | The number of bytes from the specified data that must be send. |
socketFlags | The send behavior. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Send | ( | System::ArrayPtr< uint8_t > | buffer, |
SocketFlags | socketFlags | ||
) |
Sends the specified data to the socket.
buffer | The data to send. |
socketFlags | The send behavior. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Send | ( | System::Details::ArrayView< uint8_t > | buffer, |
SocketFlags | socketFlags | ||
) |
Sends the specified data to the socket.
buffer | The data to send. |
socketFlags | The send behavior. |
|
inline |
Sends the specified data to the socket.
buffer | The data to send. |
socketFlags | The send behavior. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Send | ( | System::ArrayPtr< uint8_t > | buffer | ) |
Sends the specified data to the socket.
buffer | The data to send. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Send | ( | System::Details::ArrayView< uint8_t > | buffer | ) |
Sends the specified data to the socket.
buffer | The data to send. |
|
inline |
Sends the specified data to the socket.
buffer | The data to send. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Send | ( | System::SharedPtr< Collections::Generic::IList< ArraySegment< uint8_t >>> | buffers | ) |
Sends the specified data to the socket.
buffers | A collection of byte arrays from which data must be sent. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Send | ( | System::SharedPtr< Collections::Generic::IList< ArraySegment< uint8_t >>> | buffers, |
SocketFlags | socketFlags | ||
) |
Sends the specified data to the socket.
buffers | A collection of byte arrays from which data must be sent. |
socketFlags | The send behavior. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Send | ( | System::SharedPtr< Collections::Generic::IList< ArraySegment< uint8_t >>> | buffers, |
SocketFlags | socketFlags, | ||
SocketError & | errorCode | ||
) |
Sends the specified data to the socket.
buffers | A collection of byte arrays from which data must be sent. |
socketFlags | The send behavior. |
errorCode | The output parameter where the error code will be assigned when the send operation fails. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Send | ( | System::ArrayPtr< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags | socketFlags | ||
) |
Sends the specified data to the socket.
buffer | The data to send. |
offset | The offset in bytes in the specified array. |
size | The number of bytes in the specified array starting from the 'offset' parameter. |
socketFlags | The send behavior. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Send | ( | System::Details::ArrayView< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags | socketFlags | ||
) |
Sends the specified data to the socket.
buffer | The data to send. |
offset | The offset in bytes in the specified array. |
size | The number of bytes in the specified array starting from the 'offset' parameter. |
socketFlags | The send behavior. |
|
inline |
Sends the specified data to the socket.
buffer | The data to send. |
offset | The offset in bytes in the specified array. |
size | The number of bytes in the specified array starting from the 'offset' parameter. |
socketFlags | The send behavior. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Send | ( | System::ArrayPtr< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags | socketFlags, | ||
SocketError & | errorCode | ||
) |
Sends the specified data to the socket.
buffer | The data to send. |
offset | The offset in bytes in the specified array. |
size | The number of bytes in the specified array starting from the 'offset' parameter. |
socketFlags | The send behavior. |
errorCode | The output parameter where the error code will be assigned when the send operation fails. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::Send | ( | System::Details::ArrayView< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags | socketFlags, | ||
SocketError & | errorCode | ||
) |
Sends the specified data to the socket.
buffer | The data to send. |
offset | The offset in bytes in the specified array. |
size | The number of bytes in the specified array starting from the 'offset' parameter. |
socketFlags | The send behavior. |
errorCode | The output parameter where the error code will be assigned when the send operation fails. |
|
inline |
Sends the specified data to the socket.
buffer | The data to send. |
offset | The offset in bytes in the specified array. |
size | The number of bytes in the specified array starting from the 'offset' parameter. |
socketFlags | The send behavior. |
errorCode | The output parameter where the error code will be assigned when the send operation fails. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::SendTo | ( | System::ArrayPtr< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags | socketFlags, | ||
System::SharedPtr< EndPoint > | remoteEP | ||
) |
Sends the specified data to the specified endpoint.
buffer | The data to send. |
offset | The offset in bytes in the specified array. |
size | The number of bytes in the specified array starting from the 'offset' parameter. |
socketFlags | The send behavior. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::SendTo | ( | System::Details::ArrayView< uint8_t > | buffer, |
int32_t | offset, | ||
int32_t | size, | ||
SocketFlags | socketFlags, | ||
System::SharedPtr< EndPoint > | remoteEP | ||
) |
Sends the specified data to the specified endpoint.
buffer | The data to send. |
offset | The offset in bytes in the specified array. |
size | The number of bytes in the specified array starting from the 'offset' parameter. |
socketFlags | The send behavior. |
remoteEP | The remote endpoint. |
|
inline |
Sends the specified data to the specified endpoint.
buffer | The data to send. |
offset | The offset in bytes in the specified array. |
size | The number of bytes in the specified array starting from the 'offset' parameter. |
socketFlags | The send behavior. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::SendTo | ( | System::ArrayPtr< uint8_t > | buffer, |
int32_t | size, | ||
SocketFlags | socketFlags, | ||
System::SharedPtr< EndPoint > | remoteEP | ||
) |
Sends the specified data to the specified endpoint.
buffer | The data to send. |
size | The number of bytes in the specified array. |
socketFlags | The send behavior. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::SendTo | ( | System::Details::ArrayView< uint8_t > | buffer, |
int32_t | size, | ||
SocketFlags | socketFlags, | ||
System::SharedPtr< EndPoint > | remoteEP | ||
) |
Sends the specified data to the specified endpoint.
buffer | The data to send. |
size | The number of bytes in the specified array. |
socketFlags | The send behavior. |
remoteEP | The remote endpoint. |
|
inline |
Sends the specified data to the specified endpoint.
buffer | The data to send. |
size | The number of bytes in the specified array. |
socketFlags | The send behavior. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::SendTo | ( | System::ArrayPtr< uint8_t > | buffer, |
SocketFlags | socketFlags, | ||
System::SharedPtr< EndPoint > | remoteEP | ||
) |
Sends the specified data to the specified endpoint.
buffer | The data to send. |
socketFlags | The send behavior. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::SendTo | ( | System::Details::ArrayView< uint8_t > | buffer, |
SocketFlags | socketFlags, | ||
System::SharedPtr< EndPoint > | remoteEP | ||
) |
Sends the specified data to the specified endpoint.
buffer | The data to send. |
socketFlags | The send behavior. |
remoteEP | The remote endpoint. |
|
inline |
Sends the specified data to the specified endpoint.
buffer | The data to send. |
socketFlags | The send behavior. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::SendTo | ( | System::ArrayPtr< uint8_t > | buffer, |
System::SharedPtr< EndPoint > | remoteEP | ||
) |
Sends the specified data to the specified endpoint.
buffer | The data to send. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API int32_t System::Net::Sockets::Socket::SendTo | ( | System::Details::ArrayView< uint8_t > | buffer, |
System::SharedPtr< EndPoint > | remoteEP | ||
) |
Sends the specified data to the specified endpoint.
buffer | The data to send. |
remoteEP | The remote endpoint. |
|
inline |
Sends the specified data to the specified endpoint.
buffer | The data to send. |
remoteEP | The remote endpoint. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::set_Blocking | ( | bool | value | ) |
Sets a value that indicates if the socket is in the blocking mode.
value | The value that must be set. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::set_ConnectionTimeout | ( | int32_t | value | ) |
Sets the connection timeout.
value | The value that must be set. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::set_DontFragment | ( | bool | value | ) |
Sets a value that indicates if the socket allows IP datagrams to be fragmented.
value | The value that must be set. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::set_DualMode | ( | bool | value | ) |
Sets a value indicates if the socket is in the dual-mode.
value | The value that must be set. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::set_EnableBroadcast | ( | bool | value | ) |
Sets a value that indicates if the socket allows broadcast packets.
value | The value that must be set. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::set_ExclusiveAddressUse | ( | bool | value | ) |
Sets a value that indicates if only one process can bind the socket to a port.
value | The value that must be set. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::set_LingerState | ( | System::SharedPtr< LingerOption > | value | ) |
Sets a value that indicates if the socket will delay closing in an attempt to send all pending data.
value | The value that must be set. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::set_MulticastLoopback | ( | bool | value | ) |
Sets a value that indicates if the socket receives outgoing multicast packets.
value | The value that must be set. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::set_NoDelay | ( | bool | value | ) |
Sets a value that indicates if the socket is using the Nagle algorithm.
value | The value that must be set. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::set_ReceiveBufferSize | ( | int32_t | value | ) |
Sets the receive buffer size.
value | The value that must be set. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::set_ReceiveTimeout | ( | int32_t | value | ) |
Sets a period after which a 'Receive' call will time out.
value | The value that must be set. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::set_SendBufferSize | ( | int32_t | value | ) |
Sets the send buffer size.
value | The value that must be set. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::set_SendTimeout | ( | int32_t | value | ) |
Sets a period after which a 'Send' call will time out.
value | The value that must be set. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::set_Ttl | ( | int16_t | value | ) |
Sets the TTL value.
value | The value that must be set. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::SetSocketOption | ( | SocketOptionLevel | optionLevel, |
SocketOptionName | optionName, | ||
int32_t | optionValue | ||
) |
Sets the specified socket option to the specified value.
optionLevel | The socket option level. |
optionName | The name of the option that must be updated. |
optionValue | The value that must be set to the specified option. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::SetSocketOption | ( | SocketOptionLevel | optionLevel, |
SocketOptionName | optionName, | ||
System::ArrayPtr< uint8_t > | optionValue | ||
) |
Sets the specified socket option to the specified value.
optionLevel | The socket option level. |
optionName | The name of the option that must be updated. |
optionValue | The value that must be set to the specified option. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::SetSocketOption | ( | SocketOptionLevel | optionLevel, |
SocketOptionName | optionName, | ||
bool | optionValue | ||
) |
Sets the specified socket option to the specified value.
optionLevel | The socket option level. |
optionName | The name of the option that must be updated. |
optionValue | The value that must be set to the specified option. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::SetSocketOption | ( | SocketOptionLevel | optionLevel, |
SocketOptionName | optionName, | ||
System::SharedPtr< Object > | optionValue | ||
) |
Sets the specified socket option to the specified value.
optionLevel | The socket option level. |
optionName | The name of the option that must be updated. |
optionValue | The value that must be set to the specified option. |
ASPOSECPP_SHARED_API void System::Net::Sockets::Socket::Shutdown | ( | SocketShutdown | how | ) |
Disables the send and receive operations of the socket.
how | Specifies the operation that will no longer be allowed. |