Socket

Overview

Network Socket class.

Location

  • Reference: Island.fx
  • Namespace: RemObjects.Elements.System
  • Platforms: Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, Windows

Implements

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

Socket()

 

init()

 

Socket()

Creates a new instance with the given address family, socket type and protocol. Wraps the underlying system socket implementation.

 

constructor(anAddressFamily: AddressFamily; aSocketType: SocketType; aProtocol: ProtocolType)

 

Socket(AddressFamily anAddressFamily, SocketType aSocketType, ProtocolType aProtocol)

 

init(_ anAddressFamily: AddressFamily, _ aSocketType: SocketType, _ aProtocol: ProtocolType)

 

Socket(AddressFamily anAddressFamily, SocketType aSocketType, ProtocolType aProtocol)

Parameters:

  • anAddressFamily:
  • aSocketType:
  • aProtocol:

Accept

Accept a waiting connection.

 

method Accept: Socket

 

Socket Accept()

 

func Accept() -> Socket

 

Socket Accept()

AddressFamily

Returns the address family.

 

property AddressFamily: AddressFamily read write;

 

AddressFamily AddressFamily { get; set; }

 

var AddressFamily: AddressFamily { get{} set{} }

 

AddressFamily AddressFamily { __get; __set; }

Bind

Bind this socket to the given end point.

 

method Bind(aEndPoint: IPEndPoint)

 

void Bind(IPEndPoint aEndPoint)

 

func Bind(_ aEndPoint: IPEndPoint)

 

void Bind(IPEndPoint aEndPoint)

Parameters:

  • aEndPoint:

Close

Close the socket handle.

 

method Close

 

void Close()

 

func Close()

 

void Close()

Connect (EndPoint)

Connectto the given address/port.

 

method Connect(aEndPoint: EndPoint)

 

void Connect(EndPoint aEndPoint)

 

func Connect(_ aEndPoint: EndPoint)

 

void Connect(EndPoint aEndPoint)

Parameters:

  • aEndPoint:

Connect (IPAddress, Int32)

Connectto the given address/port.

 

method Connect(aIP: IPAddress; aPort: Int32)

 

void Connect(IPAddress aIP, Int32 aPort)

 

func Connect(_ aIP: IPAddress, _ aPort: Int32)

 

void Connect(IPAddress aIP, Int32 aPort)

Parameters:

  • aIP:
  • aPort:

Connect (String, Int32)

Connectto the given address/port.

 

method Connect(aHostOrIPAddress: String; aPort: Int32)

 

void Connect(String aHostOrIPAddress, Int32 aPort)

 

func Connect(_ aHostOrIPAddress: String, _ aPort: Int32)

 

void Connect(String aHostOrIPAddress, Int32 aPort)

Parameters:

  • aHostOrIPAddress:
  • aPort:

Connected

Returns true if connected; note that without reading, the socket state will not be updated.

 

property Connected: Boolean read write;

 

Boolean Connected { get; set; }

 

var Connected: Boolean { get{} set{} }

 

Boolean Connected { __get; __set; }

DataAvailable

Returns the nr of bytes available.

 

method DataAvailable: Int32

 

Int32 DataAvailable()

 

func DataAvailable() -> Int32

 

Int32 DataAvailable()

Disconnect

Disconnect the socket.

 

method Disconnect

 

void Disconnect()

 

func Disconnect()

 

void Disconnect()

Dispose

Close the socket handle.

 

method Dispose

 

void Dispose()

 

func Dispose()

 

void Dispose()

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

Parameters:

  • obj: the reference to compare this with.

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

Handle

Return the socket handle.

 

property Handle: Int32 read;

 

Int32 Handle { get; }

 

var Handle: Int32 { get{} }

 

Int32 Handle { __get; }

Listen

Starts listening on the socket.

 

method Listen(aBackLog: Int32)

 

void Listen(Int32 aBackLog)

 

func Listen(_ aBackLog: Int32)

 

void Listen(Int32 aBackLog)

Parameters:

  • aBackLog:

LocalEndPoint

Returns the actual local end point. When binding to port 0, this will contain the updated port.

 

property LocalEndPoint: EndPoint read;

 

EndPoint LocalEndPoint { get; }

 

var LocalEndPoint: EndPoint { get{} }

 

EndPoint LocalEndPoint { __get; }

ProtocolType

Returns the protocol type.

 

property ProtocolType: ProtocolType read write;

 

ProtocolType ProtocolType { get; set; }

 

var ProtocolType: ProtocolType { get{} set{} }

 

ProtocolType ProtocolType { __get; __set; }

Receive (array of Byte): Int32

Receive data from the socket.

 

method Receive(aBuffer: array of Byte): Int32

 

Int32 Receive(Byte[] aBuffer)

 

func Receive(_ aBuffer: Byte...) -> Int32

 

Int32 Receive(Byte[] aBuffer)

Parameters:

  • aBuffer:

Receive (array of Byte, Int32, Int32, SocketFlags): Int32

Receive data from the socket.

 

method Receive(aBuffer: array of Byte; aOffset: Int32; aSize: Int32; aFlags: SocketFlags): Int32

 

Int32 Receive(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags)

 

func Receive(_ aBuffer: Byte..., _ aOffset: Int32, _ aSize: Int32, _ aFlags: SocketFlags) -> Int32

 

Int32 Receive(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags)

Parameters:

  • aBuffer:
  • aOffset:
  • aSize:
  • aFlags:

Receive (array of Byte, Int32, SocketFlags): Int32

Receive data from the socket.

 

method Receive(aBuffer: array of Byte; aSize: Int32; aFlags: SocketFlags): Int32

 

Int32 Receive(Byte[] aBuffer, Int32 aSize, SocketFlags aFlags)

 

func Receive(_ aBuffer: Byte..., _ aSize: Int32, _ aFlags: SocketFlags) -> Int32

 

Int32 Receive(Byte[] aBuffer, Int32 aSize, SocketFlags aFlags)

Parameters:

  • aBuffer:
  • aSize:
  • aFlags:

Receive (Span<Byte>, SocketFlags): Int32 Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, Windows

Receive data from the socket.

 

method Receive(aBuffer: Span<Byte>; aFlags: SocketFlags): Int32

 

Int32 Receive(Span<Byte> aBuffer, SocketFlags aFlags)

 

func Receive(_ aBuffer: Span<Byte>, _ aFlags: SocketFlags) -> Int32

 

Int32 Receive(Span<Byte> aBuffer, SocketFlags aFlags)

Parameters:

  • aBuffer:
  • aFlags:

ReceiveFrom

Receive data and the address it's from (for udp)

 

method ReceiveFrom(aBuffer: array of Byte; aOffset: Int32; aSize: Int32; aFlags: SocketFlags; var remoteEP: EndPoint): Int32

 

Int32 ReceiveFrom(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags, ref EndPoint remoteEP)

 

func ReceiveFrom(_ aBuffer: Byte..., _ aOffset: Int32, _ aSize: Int32, _ aFlags: SocketFlags, _ remoteEP: EndPoint) -> Int32

 

Int32 ReceiveFrom(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags, __ref EndPoint remoteEP)

Parameters:

  • aBuffer:
  • aOffset:
  • aSize:
  • aFlags:
  • remoteEP:

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

Parameters:

  • a: left value
  • b: right value

RemoteEndPoint

Returns the remote end point.

 

property RemoteEndPoint: EndPoint read;

 

EndPoint RemoteEndPoint { get; }

 

var RemoteEndPoint: EndPoint { get{} }

 

EndPoint RemoteEndPoint { __get; }

Send (array of Byte): Int32

Send data to the socket.

 

method Send(aBuffer: array of Byte): Int32

 

Int32 Send(Byte[] aBuffer)

 

func Send(_ aBuffer: Byte...) -> Int32

 

Int32 Send(Byte[] aBuffer)

Parameters:

  • aBuffer:

Send (array of Byte, Int32, Int32, SocketFlags): Int32

Send data to the socket.

 

method Send(aBuffer: array of Byte; aOffset: Int32; aSize: Int32; aFlags: SocketFlags): Int32

 

Int32 Send(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags)

 

func Send(_ aBuffer: Byte..., _ aOffset: Int32, _ aSize: Int32, _ aFlags: SocketFlags) -> Int32

 

Int32 Send(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags)

Parameters:

  • aBuffer:
  • aOffset:
  • aSize:
  • aFlags:

Send (array of Byte, Int32, SocketFlags): Int32

Send data to the socket.

 

method Send(aBuffer: array of Byte; aSize: Int32; aFlags: SocketFlags): Int32

 

Int32 Send(Byte[] aBuffer, Int32 aSize, SocketFlags aFlags)

 

func Send(_ aBuffer: Byte..., _ aSize: Int32, _ aFlags: SocketFlags) -> Int32

 

Int32 Send(Byte[] aBuffer, Int32 aSize, SocketFlags aFlags)

Parameters:

  • aBuffer:
  • aSize:
  • aFlags:

Send (ImmutableSpan<Byte>, SocketFlags): Int32 Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, Windows

Send data to the socket.

 

method Send(aBuffer: ImmutableSpan<Byte>; aFlags: SocketFlags): Int32

 

Int32 Send(ImmutableSpan<Byte> aBuffer, SocketFlags aFlags)

 

func Send(_ aBuffer: ImmutableSpan<Byte>, _ aFlags: SocketFlags) -> Int32

 

Int32 Send(ImmutableSpan<Byte> aBuffer, SocketFlags aFlags)

Parameters:

  • aBuffer:
  • aFlags:

SendTo

Send data to the socket to a given address.

 

method SendTo(aBuffer: array of Byte; aOffset: Int32; aSize: Int32; aFlags: SocketFlags; remoteEP: EndPoint): Int32

 

Int32 SendTo(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags, EndPoint remoteEP)

 

func SendTo(_ aBuffer: Byte..., _ aOffset: Int32, _ aSize: Int32, _ aFlags: SocketFlags, _ remoteEP: EndPoint) -> Int32

 

Int32 SendTo(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags, EndPoint remoteEP)

Parameters:

  • aBuffer:
  • aOffset:
  • aSize:
  • aFlags:
  • remoteEP:

SetSocketOption (SocketOptionLevel, SocketOptionName, array of Byte)

Set the socket options.

 

method SetSocketOption(aOptionLevel: SocketOptionLevel; aOptionName: SocketOptionName; aOptionValue: array of Byte)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Byte[] aOptionValue)

 

func SetSocketOption(_ aOptionLevel: SocketOptionLevel, _ aOptionName: SocketOptionName, _ aOptionValue: Byte...)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Byte[] aOptionValue)

Parameters:

  • aOptionLevel:
  • aOptionName:
  • aOptionValue:

Set the socket options.

 

method SetSocketOption(aOptionLevel: SocketOptionLevel; aOptionName: SocketOptionName; aOptionValue: Boolean)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Boolean aOptionValue)

 

func SetSocketOption(_ aOptionLevel: SocketOptionLevel, _ aOptionName: SocketOptionName, _ aOptionValue: Boolean)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Boolean aOptionValue)

Parameters:

  • aOptionLevel:
  • aOptionName:
  • aOptionValue:

Set the socket options.

 

method SetSocketOption(aOptionLevel: SocketOptionLevel; aOptionName: SocketOptionName; aOptionValue: Int32)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Int32 aOptionValue)

 

func SetSocketOption(_ aOptionLevel: SocketOptionLevel, _ aOptionName: SocketOptionName, _ aOptionValue: Int32)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Int32 aOptionValue)

Parameters:

  • aOptionLevel:
  • aOptionName:
  • aOptionValue:

Set the socket options.

 

method SetSocketOption(aOptionLevel: SocketOptionLevel; aOptionName: SocketOptionName; aOptionValue: Object)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Object aOptionValue)

 

func SetSocketOption(_ aOptionLevel: SocketOptionLevel, _ aOptionName: SocketOptionName, _ aOptionValue: Object)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Object aOptionValue)

Parameters:

  • aOptionLevel:
  • aOptionName:
  • aOptionValue:

Shutdown

Shut down the socket (depending on the mode, safely)

 

method Shutdown(aMode: SocketShutdown)

 

void Shutdown(SocketShutdown aMode)

 

func Shutdown(_ aMode: SocketShutdown)

 

void Shutdown(SocketShutdown aMode)

Parameters:

  • aMode:

SocketType

Contains the socket type.

 

property SocketType: SocketType read write;

 

SocketType SocketType { get; set; }

 

var SocketType: SocketType { get{} set{} }

 

SocketType SocketType { __get; __set; }

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

AddressFamily

Returns the address family.

 

property AddressFamily: AddressFamily read write;

 

AddressFamily AddressFamily { get; set; }

 

var AddressFamily: AddressFamily { get{} set{} }

 

AddressFamily AddressFamily { __get; __set; }

Connected

Returns true if connected; note that without reading, the socket state will not be updated.

 

property Connected: Boolean read write;

 

Boolean Connected { get; set; }

 

var Connected: Boolean { get{} set{} }

 

Boolean Connected { __get; __set; }

Handle

Return the socket handle.

 

property Handle: Int32 read;

 

Int32 Handle { get; }

 

var Handle: Int32 { get{} }

 

Int32 Handle { __get; }

LocalEndPoint

Returns the actual local end point. When binding to port 0, this will contain the updated port.

 

property LocalEndPoint: EndPoint read;

 

EndPoint LocalEndPoint { get; }

 

var LocalEndPoint: EndPoint { get{} }

 

EndPoint LocalEndPoint { __get; }

ProtocolType

Returns the protocol type.

 

property ProtocolType: ProtocolType read write;

 

ProtocolType ProtocolType { get; set; }

 

var ProtocolType: ProtocolType { get{} set{} }

 

ProtocolType ProtocolType { __get; __set; }

RemoteEndPoint

Returns the remote end point.

 

property RemoteEndPoint: EndPoint read;

 

EndPoint RemoteEndPoint { get; }

 

var RemoteEndPoint: EndPoint { get{} }

 

EndPoint RemoteEndPoint { __get; }

SocketType

Contains the socket type.

 

property SocketType: SocketType read write;

 

SocketType SocketType { get; set; }

 

var SocketType: SocketType { get{} set{} }

 

SocketType SocketType { __get; __set; }

 

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

Parameters:

  • a: left value
  • b: right value

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

Socket()

 

init()

 

Socket()

Creates a new instance with the given address family, socket type and protocol. Wraps the underlying system socket implementation.

 

constructor(anAddressFamily: AddressFamily; aSocketType: SocketType; aProtocol: ProtocolType)

 

Socket(AddressFamily anAddressFamily, SocketType aSocketType, ProtocolType aProtocol)

 

init(_ anAddressFamily: AddressFamily, _ aSocketType: SocketType, _ aProtocol: ProtocolType)

 

Socket(AddressFamily anAddressFamily, SocketType aSocketType, ProtocolType aProtocol)

Parameters:

  • anAddressFamily:
  • aSocketType:
  • aProtocol:

Accept

Accept a waiting connection.

 

method Accept: Socket

 

Socket Accept()

 

func Accept() -> Socket

 

Socket Accept()

Bind

Bind this socket to the given end point.

 

method Bind(aEndPoint: IPEndPoint)

 

void Bind(IPEndPoint aEndPoint)

 

func Bind(_ aEndPoint: IPEndPoint)

 

void Bind(IPEndPoint aEndPoint)

Parameters:

  • aEndPoint:

Close

Close the socket handle.

 

method Close

 

void Close()

 

func Close()

 

void Close()

Connect (EndPoint)

Connectto the given address/port.

 

method Connect(aEndPoint: EndPoint)

 

void Connect(EndPoint aEndPoint)

 

func Connect(_ aEndPoint: EndPoint)

 

void Connect(EndPoint aEndPoint)

Parameters:

  • aEndPoint:

Connect (IPAddress, Int32)

Connectto the given address/port.

 

method Connect(aIP: IPAddress; aPort: Int32)

 

void Connect(IPAddress aIP, Int32 aPort)

 

func Connect(_ aIP: IPAddress, _ aPort: Int32)

 

void Connect(IPAddress aIP, Int32 aPort)

Parameters:

  • aIP:
  • aPort:

Connect (String, Int32)

Connectto the given address/port.

 

method Connect(aHostOrIPAddress: String; aPort: Int32)

 

void Connect(String aHostOrIPAddress, Int32 aPort)

 

func Connect(_ aHostOrIPAddress: String, _ aPort: Int32)

 

void Connect(String aHostOrIPAddress, Int32 aPort)

Parameters:

  • aHostOrIPAddress:
  • aPort:

DataAvailable

Returns the nr of bytes available.

 

method DataAvailable: Int32

 

Int32 DataAvailable()

 

func DataAvailable() -> Int32

 

Int32 DataAvailable()

Disconnect

Disconnect the socket.

 

method Disconnect

 

void Disconnect()

 

func Disconnect()

 

void Disconnect()

Dispose

Close the socket handle.

 

method Dispose

 

void Dispose()

 

func Dispose()

 

void Dispose()

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

Parameters:

  • obj: the reference to compare this with.

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

Listen

Starts listening on the socket.

 

method Listen(aBackLog: Int32)

 

void Listen(Int32 aBackLog)

 

func Listen(_ aBackLog: Int32)

 

void Listen(Int32 aBackLog)

Parameters:

  • aBackLog:

Receive (array of Byte): Int32

Receive data from the socket.

 

method Receive(aBuffer: array of Byte): Int32

 

Int32 Receive(Byte[] aBuffer)

 

func Receive(_ aBuffer: Byte...) -> Int32

 

Int32 Receive(Byte[] aBuffer)

Parameters:

  • aBuffer:

Receive (array of Byte, Int32, Int32, SocketFlags): Int32

Receive data from the socket.

 

method Receive(aBuffer: array of Byte; aOffset: Int32; aSize: Int32; aFlags: SocketFlags): Int32

 

Int32 Receive(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags)

 

func Receive(_ aBuffer: Byte..., _ aOffset: Int32, _ aSize: Int32, _ aFlags: SocketFlags) -> Int32

 

Int32 Receive(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags)

Parameters:

  • aBuffer:
  • aOffset:
  • aSize:
  • aFlags:

Receive (array of Byte, Int32, SocketFlags): Int32

Receive data from the socket.

 

method Receive(aBuffer: array of Byte; aSize: Int32; aFlags: SocketFlags): Int32

 

Int32 Receive(Byte[] aBuffer, Int32 aSize, SocketFlags aFlags)

 

func Receive(_ aBuffer: Byte..., _ aSize: Int32, _ aFlags: SocketFlags) -> Int32

 

Int32 Receive(Byte[] aBuffer, Int32 aSize, SocketFlags aFlags)

Parameters:

  • aBuffer:
  • aSize:
  • aFlags:

Receive (Span<Byte>, SocketFlags): Int32 Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, Windows

Receive data from the socket.

 

method Receive(aBuffer: Span<Byte>; aFlags: SocketFlags): Int32

 

Int32 Receive(Span<Byte> aBuffer, SocketFlags aFlags)

 

func Receive(_ aBuffer: Span<Byte>, _ aFlags: SocketFlags) -> Int32

 

Int32 Receive(Span<Byte> aBuffer, SocketFlags aFlags)

Parameters:

  • aBuffer:
  • aFlags:

ReceiveFrom

Receive data and the address it's from (for udp)

 

method ReceiveFrom(aBuffer: array of Byte; aOffset: Int32; aSize: Int32; aFlags: SocketFlags; var remoteEP: EndPoint): Int32

 

Int32 ReceiveFrom(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags, ref EndPoint remoteEP)

 

func ReceiveFrom(_ aBuffer: Byte..., _ aOffset: Int32, _ aSize: Int32, _ aFlags: SocketFlags, _ remoteEP: EndPoint) -> Int32

 

Int32 ReceiveFrom(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags, __ref EndPoint remoteEP)

Parameters:

  • aBuffer:
  • aOffset:
  • aSize:
  • aFlags:
  • remoteEP:

Send (array of Byte): Int32

Send data to the socket.

 

method Send(aBuffer: array of Byte): Int32

 

Int32 Send(Byte[] aBuffer)

 

func Send(_ aBuffer: Byte...) -> Int32

 

Int32 Send(Byte[] aBuffer)

Parameters:

  • aBuffer:

Send (array of Byte, Int32, Int32, SocketFlags): Int32

Send data to the socket.

 

method Send(aBuffer: array of Byte; aOffset: Int32; aSize: Int32; aFlags: SocketFlags): Int32

 

Int32 Send(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags)

 

func Send(_ aBuffer: Byte..., _ aOffset: Int32, _ aSize: Int32, _ aFlags: SocketFlags) -> Int32

 

Int32 Send(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags)

Parameters:

  • aBuffer:
  • aOffset:
  • aSize:
  • aFlags:

Send (array of Byte, Int32, SocketFlags): Int32

Send data to the socket.

 

method Send(aBuffer: array of Byte; aSize: Int32; aFlags: SocketFlags): Int32

 

Int32 Send(Byte[] aBuffer, Int32 aSize, SocketFlags aFlags)

 

func Send(_ aBuffer: Byte..., _ aSize: Int32, _ aFlags: SocketFlags) -> Int32

 

Int32 Send(Byte[] aBuffer, Int32 aSize, SocketFlags aFlags)

Parameters:

  • aBuffer:
  • aSize:
  • aFlags:

Send (ImmutableSpan<Byte>, SocketFlags): Int32 Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, Windows

Send data to the socket.

 

method Send(aBuffer: ImmutableSpan<Byte>; aFlags: SocketFlags): Int32

 

Int32 Send(ImmutableSpan<Byte> aBuffer, SocketFlags aFlags)

 

func Send(_ aBuffer: ImmutableSpan<Byte>, _ aFlags: SocketFlags) -> Int32

 

Int32 Send(ImmutableSpan<Byte> aBuffer, SocketFlags aFlags)

Parameters:

  • aBuffer:
  • aFlags:

SendTo

Send data to the socket to a given address.

 

method SendTo(aBuffer: array of Byte; aOffset: Int32; aSize: Int32; aFlags: SocketFlags; remoteEP: EndPoint): Int32

 

Int32 SendTo(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags, EndPoint remoteEP)

 

func SendTo(_ aBuffer: Byte..., _ aOffset: Int32, _ aSize: Int32, _ aFlags: SocketFlags, _ remoteEP: EndPoint) -> Int32

 

Int32 SendTo(Byte[] aBuffer, Int32 aOffset, Int32 aSize, SocketFlags aFlags, EndPoint remoteEP)

Parameters:

  • aBuffer:
  • aOffset:
  • aSize:
  • aFlags:
  • remoteEP:

SetSocketOption (SocketOptionLevel, SocketOptionName, array of Byte)

Set the socket options.

 

method SetSocketOption(aOptionLevel: SocketOptionLevel; aOptionName: SocketOptionName; aOptionValue: array of Byte)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Byte[] aOptionValue)

 

func SetSocketOption(_ aOptionLevel: SocketOptionLevel, _ aOptionName: SocketOptionName, _ aOptionValue: Byte...)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Byte[] aOptionValue)

Parameters:

  • aOptionLevel:
  • aOptionName:
  • aOptionValue:

Set the socket options.

 

method SetSocketOption(aOptionLevel: SocketOptionLevel; aOptionName: SocketOptionName; aOptionValue: Boolean)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Boolean aOptionValue)

 

func SetSocketOption(_ aOptionLevel: SocketOptionLevel, _ aOptionName: SocketOptionName, _ aOptionValue: Boolean)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Boolean aOptionValue)

Parameters:

  • aOptionLevel:
  • aOptionName:
  • aOptionValue:

Set the socket options.

 

method SetSocketOption(aOptionLevel: SocketOptionLevel; aOptionName: SocketOptionName; aOptionValue: Int32)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Int32 aOptionValue)

 

func SetSocketOption(_ aOptionLevel: SocketOptionLevel, _ aOptionName: SocketOptionName, _ aOptionValue: Int32)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Int32 aOptionValue)

Parameters:

  • aOptionLevel:
  • aOptionName:
  • aOptionValue:

Set the socket options.

 

method SetSocketOption(aOptionLevel: SocketOptionLevel; aOptionName: SocketOptionName; aOptionValue: Object)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Object aOptionValue)

 

func SetSocketOption(_ aOptionLevel: SocketOptionLevel, _ aOptionName: SocketOptionName, _ aOptionValue: Object)

 

void SetSocketOption(SocketOptionLevel aOptionLevel, SocketOptionName aOptionName, Object aOptionValue)

Parameters:

  • aOptionLevel:
  • aOptionName:
  • aOptionValue:

Shutdown

Shut down the socket (depending on the mode, safely)

 

method Shutdown(aMode: SocketShutdown)

 

void Shutdown(SocketShutdown aMode)

 

func Shutdown(_ aMode: SocketShutdown)

 

void Shutdown(SocketShutdown aMode)

Parameters:

  • aMode:

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()