Lines Matching refs:Client
44 * The first state a newly connected {@code Client} is in, this
48 * client.
61 * Writes the welcoming message to the client the first time this method
64 * @param client the client to receive the message
67 public void beforeRead(Client client) {
70 client.writeStringMessage("Name: ");
84 public void onData(Client client, ByteBuffer buffer, int bytes) {
89 onUserNameRead(client, name);
98 * @param client the client to set the username for
101 private void onUserNameRead(Client client, String name) {
103 client.setUserName(strings[0].trim());
104 sendRemainingParts(client, strings);
105 client.setReader(new ClientReader(chatServer, new MessageReader(chatServer)));
106 client.writeStringMessage("Welcome " + client.getUserName() + "\n");
112 * @param client the client
115 private void sendRemainingParts(Client client, String[] strings) {
117 client.appendMessage(strings[i]);