Show / Hide Table of Contents

Class Client

Generic class which establishes a socket connection to send data over the network.

Inheritance
System.Object
Client
ClientTcp
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IMLD.MixedRealityAnalysis.Network
Assembly: Assembly-CSharp.dll
Syntax
public abstract class Client : IDisposable

Constructors

Client(String, Int32)

Initializes a new instance of the Client class.

Declaration
public Client(string ipAdress, int port)
Parameters
Type Name Description
System.String ipAdress

The if address of the server, to which the client should connect.

System.Int32 port

The port of the server, to which the client should connect.

Fields

ipAddress

Declaration
protected string ipAddress
Field Value
Type Description
System.String

port

Declaration
protected int port
Field Value
Type Description
System.Int32

Properties

IpAddress

Gets the remote ip address to which the data should be send.

Declaration
public string IpAddress { get; }
Property Value
Type Description
System.String

IsOpen

Gets a value indicating whether the sender is ready to send data to the remote connection.

Declaration
public abstract bool IsOpen { get; }
Property Value
Type Description
System.Boolean

Port

Gets the remote port to which the data should be send.

Declaration
public int Port { get; }
Property Value
Type Description
System.Int32

Methods

Close()

Closes the connection.

Declaration
public abstract void Close()

Dispose()

Frees all resources used by this Client.

Declaration
public virtual void Dispose()

Open()

Tries to open the socket connection and, depending on the used protocol, tries to establish a connection with the remote host.

Declaration
public abstract bool Open()
Returns
Type Description
System.Boolean

true if the socket was opened successfully, otherwise false.

Send(Byte[])

Tries to send the specified data to the remote host.

Declaration
public abstract bool Send(byte[] data)
Parameters
Type Name Description
System.Byte[] data

The data which should be send.

Returns
Type Description
System.Boolean

true if the sending operation was successful, otherwise false.

Implements

System.IDisposable
In This Article
Back to top Generated by DocFX