Skip to content

IGameConnector ​

The base interface for all game connectors.

Kind: Interface

Namespace: ConnectorLib

Inheritance: IDisposable

Public Member Functions

abstract virtual

IBatchWriteContext

OpenBatchWriteContext()

Opens a context which can be used to perform multiple writes in a synchronized fashion. This should be used anytime multiple writes are done "at the same time", as some supported platforms may have limits on the frequency of supported write operations.

abstract virtual

bool

SendMessage(string message)

Sends a message to be displayed.

abstract virtual

void

KeepAlive()

Checks that the connection is live and restarts it if necessary.

abstract virtual

Task>

Connect()

Connects to the game system.

abstract virtual

Task>

Connect(uint retryCount, SITimeSpan retryInterval)

Connects to the game system.

abstract virtual

Task

Disconnect()

Disconnects from the game.

Properties

string

ID

[get, ]

The connector type identifier.

bool

Connected

[get, ]

true if the connector object is connected to the game; otherwise, false.

IMemoryMapper

Mapper

[get, set]

The memory mapper object used to map addresses to the game system.

Events

Action<string>

OnMessage

Called whenever SendMessage is called.

Action

OnReady

Called when the connector is ready to be used. This is called after the connector has been initialized and has connected to the game.

Action<string>

ConnectionError

Event called when a connection error occurs.

EventHandler<ValueTuple<ConnectionStatus, string>>

ConnectionStatusChanged

Called when the connection status changes.