Returns true if currently connected to a websocket server.
Returns the current connection's URL or an empty string, if not connected.
Establish a connection to an Archipelago server before authenticating; useful if there might be tasked that are needed to be performed before authenticating, but after connecting (e.g., DataPackage).
The url of the server, including the protocol (e.g., wss://archipelago.gg:38281).
The RoomInfoPacket received on initial connection.
Removes an existing event listener.
The event name associated with this listener to remove.
The callback function to remove.
Rest...args: SocketEvents[Event]This object.
Add an event listener for a specific event.
The event name to listen for.
The callback function to fire when this event is received.
Rest...args: SocketEvents[Event]This object.
Send a list of raw client packets to the server.
Rest...packets: ClientPacket[]List of client packets to send.
This SocketManager.
Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments dispatched with the event.
The event name to listen for.
An optional predicate to check on incoming events to validate if the correct event has been received. If omitted, will return immediately on next event type received.
Rest...args: SocketEvents[Event]
Manages socket-level communication and exposes helper methods/events for interacting with the Archipelago API directly.