Skip to content

SocketEvent

An event from a listen socket. Read kind first. A Connecting event must be answered with accept or reject. A Connected event gives its connection with takeConnection.

new SocketEvent(): SocketEvent

SocketEvent

get endReason(): number | null

Steam’s end reason code, set only for Disconnected events.

number | null


get kind(): ListenSocketEventKind

The kind of event.

ListenSocketEventKind


get steamId64(): bigint | null

SteamID of the remote peer, or null when the peer has no SteamID.

bigint | null


get userData(): bigint

User data of the connection, as stored by Steam.

bigint

accept(): void

Accepts a Connecting event. The connection then arrives as a Connected event on the same listen socket.

void


reject(endReason?, debugMessage?): boolean

Rejects a Connecting event.

number | null

Steam end reason code. Defaults to the generic application code.

string | null

Optional diagnostic text sent to the peer

boolean

false when Steam could not close the connection.


takeConnection(): Connection

Takes the connection of a Connected event. Can be called once.

Connection

Turn ideas into shipped software.

HagiCode is an agentic coding workspace. OpenSpec workflows plan the change, multi-agent execution carries it out, and Hero Scenario makes the long run visible, so ideas become shipped software.

Smart
OpenSpec workflows turn intent into a path from proposal to shipped change.
Efficient
Multi-agent execution runs research, build, and review in parallel.
Fun
Rich UI interactions make planning, agent work, and projects easier to follow.