Net Message Types - c01dc0ffee/gm_sourcenet GitHub Wiki

Net Message Types

net_ message types are bi-directional.

clc_ message types are sent from the client.

svc_ message types are sent by the server.

net_NOP

ID: 0
Purpose: no-operation command used for padding
Structure: 

net_Disconnect

ID: 1
Purpose: terminate network communication
Structure: 

net_File

ID: 2
Purpose: file transmission message request/deny
Structure:

net_Tick

ID: 3
Purpose: send last world tick
Structure:
* int32_t: tick
* float: hostFrameTime
* float: hostFrameTimeStdDeviation

net_StringCmd

ID: 4
Purpose: a string command
Structure:
* string: command

net_SetConVar

ID: 5
Purpose: sends one/multiple convar settings
Structure:
* many/one of cvar_t:
  * string: name
  * string: value

net_SignonState

ID: 6
Purpose: signals current signon state
Structure:
* int32_t: signonState
* int32_t spawnCount

svc_ServerInfo

ID: 7
Purpose: first message from server about game, map, etc
Structure:
* int32_t: protocol
* int32_t: serverCount
* bool: dedicated
* bool: hltv
* char: OS
* crc32_t: clientCRC
* uint8_t: mapMD5[16]
* int32_t: maxClients
* int32_t: maxClasses
* int32_t: playerSlot
* float: tickInterval
* string: gameDir
* string: mapName
* string: skyName
* string: hostName
* string: loadingURL
* string: gamemode

svc_SendTable

ID: 9
Purpose: sends a sendtable description for a game class
Structure:
* bool: needsDecoder
* int32_t: length
* bf_read: dataIn
* bf_write: dataOut

svc_ClassInfo

ID: 10
Purpose: info about a class (first byte is a CLASSINFO_ define)
Structure:
* bool: createOnClient
* class_t: class info
  * int32_t classId
  * char dataTableName[256]
  * char className[256]
* int32_t numServerClasses

svc_SetPause

ID: 11
Purpose: tells client if server paused or unpaused
Structure:
* bool: paused