mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-28 06:32:37 +00:00
3c55b43e25
made before, it breaks a few things but it needs to be committed so they can be fixed..
61 lines
1.6 KiB
Text
61 lines
1.6 KiB
Text
// This is the network info/connection protocol. It is used to find Quake
|
|
// servers, get info about them, and connect to them. Once connected, the
|
|
// Quake game protocol (documented elsewhere) is used.
|
|
//
|
|
//
|
|
// General notes:
|
|
// game_name is currently always "QUAKE", but is there so this same protocol
|
|
// can be used for future games as well; can you say Quake2?
|
|
//
|
|
// CCREQ_CONNECT
|
|
// string game_name "QUAKE"
|
|
// byte net_protocol_version NET_PROTOCOL_VERSION
|
|
//
|
|
// CCREQ_SERVER_INFO
|
|
// string game_name "QUAKE"
|
|
// byte net_protocol_version NET_PROTOCOL_VERSION
|
|
//
|
|
// CCREQ_PLAYER_INFO
|
|
// byte player_number
|
|
//
|
|
// CCREQ_RULE_INFO
|
|
// string rule
|
|
//
|
|
//
|
|
//
|
|
// CCREP_ACCEPT
|
|
// long port
|
|
//
|
|
// CCREP_REJECT
|
|
// string reason
|
|
//
|
|
// CCREP_SERVER_INFO
|
|
// string server_address
|
|
// string host_name
|
|
// string level_name
|
|
// byte current_players
|
|
// byte max_players
|
|
// byte protocol_version NET_PROTOCOL_VERSION
|
|
//
|
|
// CCREP_PLAYER_INFO
|
|
// byte player_number
|
|
// string name
|
|
// long colors
|
|
// long frags
|
|
// long connect_time
|
|
// string address
|
|
//
|
|
// CCREP_RULE_INFO
|
|
// string rule
|
|
// string value
|
|
|
|
// note:
|
|
// There are two address forms used above. The short form is just
|
|
// a port number. The address that goes along with the port is
|
|
// defined as "whatever address you receive this reponse from".
|
|
// This lets us use the host OS to solve the problem of multiple
|
|
// host addresses (possibly with no routing between them); the
|
|
// host will use the right address when we reply to the inbound
|
|
// connection request. The long from is a full address and port
|
|
// in a string. It is used for returning the address of a server
|
|
// that is not running locally.
|