Creating an IM Client in Java
<p>I'm creating a simple IM Client where a client instance can connect to the server on a port then send to and receive messages from other connected users.</p>

<p>Since I'm getting the input from the client's <code>System.in</code>, I can't differentiate when the client is trying to register a username or send a message. How can I effectively differentiate what is what on the server side, when text is received from a client?</p>

<p>I have considered requiring the client to specify the user to send to, which would act as an indicator that it was a message. This would be similar to in-game chats where you type "/tell username message". </p>
