server and client associate buffer lines using a unique(within a buffer) ID number, and an integer offset. no need for tracking message IDs Buffer operations: (messages from server, telling client something happened to the buffer) "There is a new buffer named xxx" "The buffer named xxx has been deleted" (response to client request for root buffers) (response to client request for buffers in "f00f.net") (response to client request for buffers in "xenocide") (response to client request for content of "f00f.net/xenocide") Hi (response to client request for content of "f00f.net/xenocide/userlizt") Xenoc [Jane] repp (response to client request for viewing id of "f00f.net/xenocide") Note: These following operations do not cause id numbers to be inserted or deleted, rather, what datum is associated with what id is changed. "This buffer has had n lines removed from the end" "This buffer has had n lines from position x moved +/-y lines" (Leave the data alone - as in - lines that are "exposed" are left.) "This buffer has new data starting at line n (overwrite)" "This has been appended to the buffer" To insert a user in the middle of a userlist buffer.. The userlist buffer has a first id of 0, all the ids are sequential, and there are 15 elements in the list. (Note atomic operation) Squint Bye, squint... Error, from server: "ID requested not found. topID=xxx bottomID=xxx" (note : IDs are not greater than MAX_INT, may wrap) Messages from the client: ask for buffer list (optionally within buffer) get viewing id viewing id (tell server what line of buffer you're viewing) get buffer content (id, and +/- count) "click" input string (Sent upon connect) (Sent after the first buffer list has been recieved) (sent after f00f.net buffer list has been recieved) (sent when "xenocide" is first viewed (maybe the client has a -very- short term memory...)) (sent when "xenocide" is first viewed (maybe the client has a -very- short term memory...)) (blah blah, stuff's been appended. send server current viewing id. If your viewing id is the last line in the buffer, the server should automagicaly update your viewing id when a line is appended.) (input events are a plain text string the user types) hello!!!!!!!