package com.github.noxan.aves.demo.chat;

import java.io.IOException;

import com.github.noxan.aves.client.Client;
import com.github.noxan.aves.client.ClientAdapter;
import com.github.noxan.aves.client.SocketClient;

public class ChatClient extends ClientAdapter {
    private SocketClient client;
    private ChatClientGUI gui;

    public static void main(String[] args) {
        new ChatClient();
    }

    public ChatClient() {
        client = new SocketClient(this);
        gui = new ChatClientGUI(this);
    }

    public void connect() {
        try {
            client.connect();
        } catch(IOException e) {
            e.printStackTrace();
        }
    }
}

@@ -506,32 +506,258 @@
 I(this);%0A    %7D%0A%0A
+    public void login(String username, String password) %7B%0A        try %7B%0A            client.write(%22login;%22 + username + %22;%22 + password + %22%5Cn%22);%0A        %7D catch(IOException e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%0A
     public void 

add login method to chatclient