ProxyRelayListener - SocketSVC Docs
SocketSVC Docs

ProxyRelayListener

Observes the relay's connection lifecycle.

Generated from source

Interface com.socketsvc.proxy.api.ProxyRelayListener — generated from ProxyRelayListener.java. Edit the Javadoc in the Java source, then run pnpm gen:api.

package com.socketsvc.proxy.api;

public interface ProxyRelayListener { ... }

Observes the relay's connection lifecycle. Every method is a no-op by default, so an addon only overrides what it needs.

Callbacks run on the relay's own threads, never on the proxy's main thread, and a listener that throws is logged and skipped rather than breaking the connection. Do not block in them: the open callback runs before the connection is piped, and the close callback runs as it is torn down. These report relay activity only — the relay never decodes audio, so there is nothing here about speaking, volume or positions. Those live on the backend's own spatial audio API.

Methods

onRelayOpened

default void onRelayOpened(RelaySession session)

A connection was matched to a backend and is about to be piped through. Before the backend has checked its token: the session's player id is only what the client claimed.

onRelayClosed

default void onRelayClosed(RelaySession session)

A previously opened relay finished, for any reason (either side closed, or the relay stopped).

onRelayRejected

default void onRelayRejected(UUID playerId, String reason)

An incoming connection was closed without being relayed.

ParameterDescription
playerIdthe connecting player, or null when the connection never supplied a usable uuid query parameter
reasona short human-readable explanation, the same text written to the proxy log