Table of Contents

Class Host

Namespace
QuickLink
Assembly
QuickLink.dll

Represents a host that communicates with a server and sends/receives messages.

public class Host : IClient, IDisposable
Inheritance
Host
Implements
Inherited Members

Constructors

Initializes a new instance of the Host class with the specified port.

public Host(int port)

Parameters

port int

The port number to use for communication.

Fields

The server associated with the host.

public readonly Server Server

Field Value

Server

Properties

Event that is raised when a message is received.

public MessagePublisher MessageReceived { get; }

Property Value

MessagePublisher

Methods

Disposes the host and releases any resources used.

public void Dispose()

Disposes the host and releases any resources used.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Finalizes an instance of the Host class.

protected ~Host()

Receives a message from the server.

public void RecieveFromServer(MessageReader message)

Parameters

message MessageReader

The received message.

Sends a message to the server.

public void SendToServer(MessageWriter message)

Parameters

message MessageWriter

The message to send.