Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
ChatNet Protocol v1.6

 
Post new topic   Reply to topic Printable version
 View previous topic  SetFreq Post :: Post Your own squad  View next topic  
Author Message
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Thu Nov 18, 2004 3:09 pm    Post subject: ChatNet Protocol v1.6 Reply to topic Reply with quote

Code: Show/Hide

simple chat protocol
version 1.6
grelminar -at- yahoo.com
--------------------

the protocol is ascii over tcp. each message contains several fields,
the first of which a type field that determines the meaning of the
remaining ones. fields are separated by a colon (':', ascii 58). each
message is terminated by either a CR (ascii 13), a LF (ascii 10) or any
combination of those two.

either side can close the connection at any time. the other side should
respond to this by closing their end of the connection also.

unless otherwise specified, the last field for each message type is
allowed to contain colons.

player names are used to differentiate players. case is insignificant
when comparing player names, but the server is required to use the same
capitalization for all instances of the same player in the same session
(i.e., if someone logs out and logs in again, the case of their name
might change).

the rest of this document will describe the possible message types. if
you recieve an unsupported message type, you should ignore it. in the
following, capital letters generally designate stuff that should be sent
literally, as it is printed here. lowercase letters are descriptions of
fields will be filled in with the relevant data.


login:

client sends:
   LOGIN:version:name:password
      (the version field contains the protocol version, and also some
      information about the client. it should be of the form "1;client
      name and version". for example, "1;ccc 1.2, by grelminar".)

server will respond with one of:
   LOGINBAD:message
      (disconnect)
or
   LOGINOK:yourname
      (the server/biller can rename clients, so the new name must be
      sent back to the client)


entering arenas:

client sends:
   GO:name
      (use an empty name to mean "first public arena". note that even
      if name is empty, the colon is still required.)


server may reply:
   INARENA:arenaname:freq
      (client should clear its player list when it gets this. freq is
      the freq that the client has been assigned. chat clients are
      always in spectator mode, and never in ships.)
   PLAYER:name:ship:freq
      (one line for each player who's in the arena at the time when it
      is entered.)


enter/leave notification:

server sends:
   ENTERING:name:ship:freq
      (when a player enters an arena)
   LEAVING:name
      (when a player leaves)


ship/freq changes:

client sends:
   CHANGEFREQ:freq

server sends:
   SHIPFREQCHANGE:name:ship:freq
      (ships are numbered from 0 (warbird) to 8 (spectator))


kills:

server sends:
   KILL:killername:killedname:bounty:flagscarried


chat (the important part):

client sends:
   SEND:PUB:msg
   SEND:PUBM:msg
   SEND:PRIV:name:msg
      (the same message type works for both regular and remove priv msgs)
   SEND:FREQ:freq:msg
      (freq is the number of the destination freq)
   SEND:CHAT:line
      (line is either "msg" or "channelnum;msg")
   SEND:MOD:msg
   SEND:CMD:cmd
   SEND:PRIVCMD:name:msg
   SEND:SQUAD:squad:msg

server sends:
   MSG:ARENA:msg
   MSG:CMD:msg
   MSG:PUB:name:msg
   MSG:PUBM:name:msg
      (macroed pub message)
   MSG:PRIV:name:msg
   MSG:FREQ:name:msg
   MSG:CHAT:channelnum:msg
   MSG:MOD:name:msg
   MSG:SYSOP:msg
   MSG:SQUAD:squad:sender:msg


miscellaneous:

client or server can send at any time:
   NOOP

this can be used (by the client) to implement a keepalive ping to get
around crappy nat routers, or (by the server) to help time out dead
clients.



document history:

1.6:
   added NOOP type.

1.5:
   added client name in the version field of LOGIN.
   added PUBM message type.

1.4 and before:
   detailed history unavailable


# dist: public

_________________
Performance is often the art of cheating carefully. - James Gosling




simple-chat.txt - 3.44 KB
File downloaded or viewed 13 time(s)
Back to top
View users profile Send private message Add User to Ignore List
Grelminar
Creator of Asss


Joined: Feb 26 2003
Posts: 378
Offline

PostPosted: Fri Nov 19, 2004 2:39 am    Post subject: Reply to topic Reply with quote

Um, why in the world did you post this here? The latest version is always available at http://sscx.net/asss/simple-chat.txt
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Fri Nov 19, 2004 8:55 am    Post subject: Reply to topic Reply with quote

Because there is a copy of the older -version on here; so I figured I'd just plop it.
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 43 page(s) served in previous 5 minutes.

phpBB Created this page in 0.434245 seconds : 30 queries executed (93.6%): GZIP compression disabled