Table of Contents

Class ProtocolBase

Namespace
OpenGSQ
Assembly
OpenGSQ.dll

Abstract base class for protocols.

public abstract class ProtocolBase
Inheritance
ProtocolBase
Derived
Inherited Members

Constructors

ProtocolBase(string, int, int)

Initializes a new instance of the ProtocolBase class.

public ProtocolBase(string host, int port, int timeout = 5000)

Parameters

host string

The host to connect to.

port int

The port to connect to.

timeout int

The connection timeout in milliseconds. Default is 5 seconds.

Properties

FullName

Gets the full name of the protocol.

public abstract string FullName { get; }

Property Value

string

Host

Gets the host to connect to.

public string Host { get; }

Property Value

string

Port

Gets the port to connect to.

public int Port { get; }

Property Value

int

Timeout

The timeout for the connection in seconds.

public int Timeout { get; }

Property Value

int

Methods

GetIPAddress()

Retrieves the IP address of the host.

protected Task<string> GetIPAddress()

Returns

Task<string>

A task that represents the asynchronous operation. The task result contains the IP address of the host.