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.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SocketEvent():
SocketEvent
Returns
Section titled “Returns”SocketEvent
Accessors
Section titled “Accessors”endReason
Section titled “endReason”Get Signature
Section titled “Get Signature”get endReason():
number|null
Steam’s end reason code, set only for Disconnected events.
Returns
Section titled “Returns”number | null
Get Signature
Section titled “Get Signature”get kind():
ListenSocketEventKind
The kind of event.
Returns
Section titled “Returns”steamId64
Section titled “steamId64”Get Signature
Section titled “Get Signature”get steamId64():
bigint|null
SteamID of the remote peer, or null when the peer has no SteamID.
Returns
Section titled “Returns”bigint | null
userData
Section titled “userData”Get Signature
Section titled “Get Signature”get userData():
bigint
User data of the connection, as stored by Steam.
Returns
Section titled “Returns”bigint
Methods
Section titled “Methods”accept()
Section titled “accept()”accept():
void
Accepts a Connecting event. The connection then arrives as a Connected event on the same listen socket.
Returns
Section titled “Returns”void
reject()
Section titled “reject()”reject(
endReason?,debugMessage?):boolean
Rejects a Connecting event.
Parameters
Section titled “Parameters”endReason?
Section titled “endReason?”number | null
Steam end reason code. Defaults to the generic application code.
debugMessage?
Section titled “debugMessage?”string | null
Optional diagnostic text sent to the peer
Returns
Section titled “Returns”boolean
false when Steam could not close the connection.
takeConnection()
Section titled “takeConnection()”takeConnection():
Connection
Takes the connection of a Connected event. Can be called once.
Returns
Section titled “Returns”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.
© 2026 HagiCode | Powered By hagilight-starlight@0.23.0 | Branch: main | Commit: 7164ec7 | Built:
