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()

 

Sub New()

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)

 

Sub New(anAddressFamily As AddressFamily, aSocketType As SocketType, aProtocol As ProtocolType)

Parameters:

  • anAddressFamily:
  • aSocketType:
  • aProtocol:

Accept

Accept a waiting connection.

 

method Accept: Socket

 

Socket Accept()

 

func Accept() -> Socket

 

Socket Accept()

 

Function Accept() As Socket

AddressFamily

Returns the address family.

 

property AddressFamily: AddressFamily read write;

 

AddressFamily AddressFamily { get; set; }

 

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

 

AddressFamily AddressFamily { __get; __set; }

 

Property AddressFamily() As AddressFamily

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)

 

Sub Bind(aEndPoint As IPEndPoint)

Parameters:

  • aEndPoint:

Close

Close the socket handle.

 

method Close

 

void Close()

 

func Close()

 

void Close()

 

Sub Close()

Connect (EndPoint)

Connectto the given address/port.

 

method Connect(aEndPoint: EndPoint)

 

void Connect(EndPoint aEndPoint)

 

func Connect(_ aEndPoint: EndPoint)

 

void Connect(EndPoint aEndPoint)

 

Sub Connect(aEndPoint As EndPoint)

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)

 

Sub Connect(aIP As IPAddress, aPort As Int32)

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)

 

Sub Connect(aHostOrIPAddress As String, aPort As Int32)

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; }

 

Property Connected() As Boolean

DataAvailable

Returns the nr of bytes available.

 

method DataAvailable: Int32

 

Int32 DataAvailable()

 

func DataAvailable() -> Int32

 

Int32 DataAvailable()

 

Function DataAvailable() As Int32

Disconnect

Disconnect the socket.

 

method Disconnect

 

void Disconnect()

 

func Disconnect()

 

void Disconnect()

 

Sub Disconnect()

Dispose

Close the socket handle.

 

method Dispose

 

void Dispose()

 

func Dispose()

 

void Dispose()

 

Sub 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)

 

Function Equals(obj As Object) As Boolean

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()

 

Sub 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()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

Handle

Return the socket handle.

 

property Handle: Int32 read;

 

Int32 Handle { get; }

 

var Handle: Int32 { get{} }

 

Int32 Handle { __get; }

 

ReadOnly Property Handle() As Int32

Listen

Starts listening on the socket.

 

method Listen(aBackLog: Int32)

 

void Listen(Int32 aBackLog)

 

func Listen(_ aBackLog: Int32)

 

void Listen(Int32 aBackLog)

 

Sub Listen(aBackLog As Int32)

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; }

 

ReadOnly Property LocalEndPoint() As EndPoint

ProtocolType

Returns the protocol type.

 

property ProtocolType: ProtocolType read write;

 

ProtocolType ProtocolType { get; set; }

 

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

 

ProtocolType ProtocolType { __get; __set; }

 

Property ProtocolType() As ProtocolType

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)

 

Function Receive(aBuffer As Byte()) As Int32

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)

 

Function Receive(aBuffer As Byte(), aOffset As Int32, aSize As Int32, aFlags As SocketFlags) As Int32

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)

 

Function Receive(aBuffer As Byte(), aSize As Int32, aFlags As SocketFlags) As Int32

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)

 

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

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)

 

Function ReceiveFrom(aBuffer As Byte(), aOffset As Int32, aSize As Int32, aFlags As SocketFlags, ByRef remoteEP As EndPoint) As Int32

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)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

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; }

 

ReadOnly Property RemoteEndPoint() As EndPoint

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)

 

Function Send(aBuffer As Byte()) As Int32

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)

 

Function Send(aBuffer As Byte(), aOffset As Int32, aSize As Int32, aFlags As SocketFlags) As Int32

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)

 

Function Send(aBuffer As Byte(), aSize As Int32, aFlags As SocketFlags) As Int32

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)

 

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

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)

 

Function SendTo(aBuffer As Byte(), aOffset As Int32, aSize As Int32, aFlags As SocketFlags, remoteEP As EndPoint) As Int32

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)

 

Sub SetSocketOption(aOptionLevel As SocketOptionLevel, aOptionName As SocketOptionName, aOptionValue As Byte())

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)

 

Sub SetSocketOption(aOptionLevel As SocketOptionLevel, aOptionName As SocketOptionName, aOptionValue As Boolean)

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)

 

Sub SetSocketOption(aOptionLevel As SocketOptionLevel, aOptionName As SocketOptionName, aOptionValue As Int32)

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)

 

Sub SetSocketOption(aOptionLevel As SocketOptionLevel, aOptionName As SocketOptionName, aOptionValue As Object)

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)

 

Sub Shutdown(aMode As SocketShutdown)

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; }

 

Property SocketType() As SocketType

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

 

AddressFamily

Returns the address family.

 

property AddressFamily: AddressFamily read write;

 

AddressFamily AddressFamily { get; set; }

 

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

 

AddressFamily AddressFamily { __get; __set; }

 

Property AddressFamily() As AddressFamily

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; }

 

Property Connected() As Boolean

Handle

Return the socket handle.

 

property Handle: Int32 read;

 

Int32 Handle { get; }

 

var Handle: Int32 { get{} }

 

Int32 Handle { __get; }

 

ReadOnly Property Handle() As Int32

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; }

 

ReadOnly Property LocalEndPoint() As EndPoint

ProtocolType

Returns the protocol type.

 

property ProtocolType: ProtocolType read write;

 

ProtocolType ProtocolType { get; set; }

 

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

 

ProtocolType ProtocolType { __get; __set; }

 

Property ProtocolType() As ProtocolType

RemoteEndPoint

Returns the remote end point.

 

property RemoteEndPoint: EndPoint read;

 

EndPoint RemoteEndPoint { get; }

 

var RemoteEndPoint: EndPoint { get{} }

 

EndPoint RemoteEndPoint { __get; }

 

ReadOnly Property RemoteEndPoint() As EndPoint

SocketType

Contains the socket type.

 

property SocketType: SocketType read write;

 

SocketType SocketType { get; set; }

 

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

 

SocketType SocketType { __get; __set; }

 

Property SocketType() As SocketType

 

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)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

Socket()

 

init()

 

Socket()

 

Sub New()

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)

 

Sub New(anAddressFamily As AddressFamily, aSocketType As SocketType, aProtocol As ProtocolType)

Parameters:

  • anAddressFamily:
  • aSocketType:
  • aProtocol:

Accept

Accept a waiting connection.

 

method Accept: Socket

 

Socket Accept()

 

func Accept() -> Socket

 

Socket Accept()

 

Function Accept() As Socket

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)

 

Sub Bind(aEndPoint As IPEndPoint)

Parameters:

  • aEndPoint:

Close

Close the socket handle.

 

method Close

 

void Close()

 

func Close()

 

void Close()

 

Sub Close()

Connect (EndPoint)

Connectto the given address/port.

 

method Connect(aEndPoint: EndPoint)

 

void Connect(EndPoint aEndPoint)

 

func Connect(_ aEndPoint: EndPoint)

 

void Connect(EndPoint aEndPoint)

 

Sub Connect(aEndPoint As EndPoint)

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)

 

Sub Connect(aIP As IPAddress, aPort As Int32)

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)

 

Sub Connect(aHostOrIPAddress As String, aPort As Int32)

Parameters:

  • aHostOrIPAddress:
  • aPort:

DataAvailable

Returns the nr of bytes available.

 

method DataAvailable: Int32

 

Int32 DataAvailable()

 

func DataAvailable() -> Int32

 

Int32 DataAvailable()

 

Function DataAvailable() As Int32

Disconnect

Disconnect the socket.

 

method Disconnect

 

void Disconnect()

 

func Disconnect()

 

void Disconnect()

 

Sub Disconnect()

Dispose

Close the socket handle.

 

method Dispose

 

void Dispose()

 

func Dispose()

 

void Dispose()

 

Sub 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)

 

Function Equals(obj As Object) As Boolean

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()

 

Sub 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()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

Listen

Starts listening on the socket.

 

method Listen(aBackLog: Int32)

 

void Listen(Int32 aBackLog)

 

func Listen(_ aBackLog: Int32)

 

void Listen(Int32 aBackLog)

 

Sub Listen(aBackLog As Int32)

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)

 

Function Receive(aBuffer As Byte()) As Int32

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)

 

Function Receive(aBuffer As Byte(), aOffset As Int32, aSize As Int32, aFlags As SocketFlags) As Int32

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)

 

Function Receive(aBuffer As Byte(), aSize As Int32, aFlags As SocketFlags) As Int32

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)

 

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

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)

 

Function ReceiveFrom(aBuffer As Byte(), aOffset As Int32, aSize As Int32, aFlags As SocketFlags, ByRef remoteEP As EndPoint) As Int32

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)

 

Function Send(aBuffer As Byte()) As Int32

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)

 

Function Send(aBuffer As Byte(), aOffset As Int32, aSize As Int32, aFlags As SocketFlags) As Int32

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)

 

Function Send(aBuffer As Byte(), aSize As Int32, aFlags As SocketFlags) As Int32

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)

 

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

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)

 

Function SendTo(aBuffer As Byte(), aOffset As Int32, aSize As Int32, aFlags As SocketFlags, remoteEP As EndPoint) As Int32

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)

 

Sub SetSocketOption(aOptionLevel As SocketOptionLevel, aOptionName As SocketOptionName, aOptionValue As Byte())

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)

 

Sub SetSocketOption(aOptionLevel As SocketOptionLevel, aOptionName As SocketOptionName, aOptionValue As Boolean)

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)

 

Sub SetSocketOption(aOptionLevel As SocketOptionLevel, aOptionName As SocketOptionName, aOptionValue As Int32)

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)

 

Sub SetSocketOption(aOptionLevel As SocketOptionLevel, aOptionName As SocketOptionName, aOptionValue As Object)

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)

 

Sub Shutdown(aMode As SocketShutdown)

Parameters:

  • aMode:

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String