Grelminar wrote: |
TCP is hard in Java?! I specifically made it simple text over TCP so that it's easy to deal with. Just make a BufferedReader from an InputStreamReader from the socket input stream and call readLine() on it, then use String.split (the two-arg version, so you can specify a limit). Easy. Requires 1.4.1, but that's been out for a while. |
Quote: |
Ok, I made both protocols use the same arena name limitations. |
Quote: |
I'm not sure what you mean by "team" vs. "freq" chats. Do you mean your own team vs. an enemy team? I wasn't sure which way to go on that.. I think the current way (having them be the same) in the protocol makes the protocol and server simple but might require additional work on the client. But it's really not very much more work, so I think I'm going to keep it. |
Quote: |
The protocol, or at least the current impl. certainly needs more work, though: private freqs aren't currently hidden, and I don't think the server supports chat clients changing freq at all. All the ideas I've heard for how to handle private freqs sound hacky to me, so I'm in favor of not handling them. That is, all freq numbers get sent as they are, and everyone knows all freq numbers. Don't worry; this isn't as bad as it sounds: The freqowners module already allows people to kick unwanted people off of their priv freqs, and I'd like to write a password-protected freq system eventually so unwanted people can't even get on in the first place. Comments appreciated on all this. |
Grelminar wrote: |
Requires 1.4.1 |
Code: Show/Hide TEAM:Smong:A1> Attach to defendTEAM:Smong:A1> Attach to attackARENA:Gotcha.. |
Code: Show/Hide byte[] dataB = new byte[1024]; ... recv.read(dataB, len, newLen); //recv is the InputStream ... data = new String(dataB, 0, newLen); |