--- Empire Server Protocol --- by Ken Stevens 26 June 95 The best way to learn Empire server protocol is to read the source for a simple client. But to save you doing that, I'll just tell you here what the Empire server protocol is: Protocol Meaning -------- ------- 0 login command ok 1 normal data 2 2 login sequence complete 3 used in abnormal situations 4 a sub prompt 5 no-echo (e.g. password) 6 the main prompt 7 server aborted 8 redirect output to 9 pipe output to a login error (country doesn't exist...) b login error (no such command...) c execute commands (see EXAMPLE 2) d flash telegram from another player e telegram information (see below) f C_SYNC message (see C_SYNC RFC) Note: protocols 5 and 7 are not currently used by the server. Example 1 : Login Sequence Client -> Server Server -> Client ---------------- ---------------- 2 Empire server ready client esh 0.0.3 Alpha 0 talking to esh 0.0.3 Alpha user yang 0 hello yang coun Fodderland 0 country name Fodderland pass alfresco 0 password ok play 2 2 EXAMPLE 2 : Typical Dialogue Client -> Server Server -> Client ---------------- ---------------- 6 416 408 starv * 1 Sat Aug 13 16:50:07 1994 1 *: No sector(s) 6 416 407 move 4 move what? c 4 from sector : aborted 1 Usage: move Server Server -> Client ---------------- ---------------- 6 416 408 exe foo c foo cen 0,0 1 Execute : cen 0,0 1 Mon Jun 26 ... 1 1 sector cen 2,0 1 Execute : cen 2,0 1 Mon Jun 26 ... 1 1 sector ctld 1 Execute : terminated 6 416 407 EXAMPLE 4 : Asynchronious communication Note that in this example, the final "e" is really a "e ". These commands are asynchronous from the server meaning that the client didn't "ask" for them--they just arrived out of the blue. Client -> Server Server -> Client ---------------- ---------------- 6 416 408 d async message from the server e [new tele] e [7 new teles] e