* differences between connected and non-connected networking TCP vs UDP connection oriented (TCP) is like a phone call -- once a connection is established you've got bidirection communication flow until one or the other party hangs up; in-order and complete data; loss recovery can mean that data gets delayed; you may receive either partial messages or multiple messages in a single read connectionless (UDP) is like a letter (or a series of letter) -- you recieve one message in its entirety, but (as with the postal service) letters can get lost or arrive out of order; also, you have no way to know that a letter was; a single receive always delivers a single complete message tracking active sessions TCP -- you need a connected socket for each client the call to accept happens at a point when data might not be available yet UDP -- you identify clients by addr,port if it's a new client, it _should_ be (must be?) a JOIN starting new sessions TCP -- you accept client socket #8, now what? to follow the protocol, you have to be able to handle more than 7 active clients sockets so that you can receive the JOIN and send FULL but how many connections without JOIN are you willing to keep around; and how long do you want to wait UDP -- when you receive a JOIN message and you've got too many, just send FULL (as per the spec) * things to think about How should the server respond if it gets an out-of-order message? e.g., DRAW when it expects JOIN How should the client or server respond if an expected message doesn't arrive in a reasonable amount of time?