sam: I'd like to do some more on that chat system we were writing. sam: maybe a relay server, a bit like NNTP / usenet where posts are relayed to other servers and duplicates are dropped sam: I was thinking 3 levels of protocol - 1. just plain messages, 2. from: message, 3. time from to: message sam: the relays would use level 3, while the clients would send level 1 and receive probably level 2... or something like that! sam: A client would use a separate TCP connection for each conversation - so no need to write "from" and "to" on every line, that is fixed with the connection. A relay would use one connection per peer server. sam: I hope that makes some kind of sense. No need to go implement it, but maybe you have some ideas about it. implement 'rooms' / conversations - including private conversations / rooms - 'rooms' named bar,baz,foo (sorted usernames) are for those users to communicate only - room named 'sam' would be for sam only (to talk to himself!) - option to receive packets without source prefix (good for 1-1 conversations and generic TCP relay service) - option to forward packets, or lines - option for write-only / read-only chats - option for no-echo / confirm / echo - confirm is just like 'username:' without - no esc sequence or commands. Could implement commands by sending messages to a robot, perhaps in a different connection, or using level 3. protocol levels: 0 - plain packets 1 - plain lines 2 - from: message 3 - from: to, message 4 - time from: to, message