Skip to content

Interface IProxy

Namespace: Void.Proxy.Api
Assembly: Void.Proxy.Api.dll

public interface IProxy

Properties

Interface

Gets the IP address of the network interface on which the connection listener is bound.

IPAddress Interface { get; }

Property Value

IPAddress

Port

Gets the network port number used for the connection listener.

int Port { get; }

Property Value

int

Status

Gets a value indicating the current status of the proxy.

ProxyStatus Status { get; }

Property Value

ProxyStatus

Methods

PauseAcceptingConnections()

Pauses the acceptance of new incoming connections.

void PauseAcceptingConnections()

Remarks

This method temporarily halts the ability to accept new connections. Existing connections remain unaffected and continue to operate normally. Use this method when you need to stop accepting new connections without disrupting online players.

StartAcceptingConnectionsAsync(CancellationToken)

Starts accepting connections on the listener.

ValueTask StartAcceptingConnectionsAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

ValueTask

Stop(bool)

Stops the server and optionally waits for all online players to disconnect.

void Stop(bool waitOnlinePlayers = false)

Parameters

waitOnlinePlayers bool

A value indicating whether to wait for all online players to disconnect before stopping the server. true to wait for players to disconnect; otherwise, false.

Remarks

If waitOnlinePlayers is set to true, the proxy will wait until all players have disconnected. Use this option to ensure a graceful shutdown when active player sessions are present.