Sending Data over Sockets

so im trying to build a networked game using sockets. first of all its going to be an applet. what are the issues with using sockets in applets? something about they can only connect back to the host server?

also after researching a little it seems you can only send text over sockets easily? is there a way to send numbers(eg int, float, etc.)? if not whats the best way to convert numbers in a string to mean actual numbers?

something like this ?

i = Integer.valueOf(string).intValue();

also what does the data protocol look like for multiplayer games? my game is going to be 1 vs 1 but hopefully many users can be playing at one time. How do games like this specify data transfer between only two users and not all users currently connected?

Yep, unsigned Applets can only make connections back to the server that hosted them - http://java.sun.com/sfaq/

As to what you can send…anything you like.
Sockets have an InputStream & OutputStream, you can read/write whatever data you like to these streams - typically by wrapping them in a Data[Input/Output]Stream.

what about the game protocol? say i have a multi-threaded server that creates a thread for each client connected. then two clients want to play each other in a game. these two clients will then need to send data back and forth. how do you specify which client to send data to?