package com.github.noxan.aves.client.socket;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;

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

public class SocketClient implements Client {
    private String host;
    private int port;
    private Socket socket;

    public SocketClient() {
        this("localhost", 1666);
    }

    public SocketClient(String host, int port) {
        this.host = host;
        this.port = port;
    }

    @Override
    public String getHost() {
        return host;
    }

    @Override
    public int getPort() {
        return port;
    }

    @Override
    public void connect() throws IOException {
        socket = new Socket();
        socket.connect(new InetSocketAddress(host, port));
    }

    @Override
    public void disconnect() {
    }
}

@@ -170,16 +170,67 @@
 .Client;
+%0Aimport com.github.noxan.aves.client.ClientHandler;
 %0A%0Apublic
@@ -342,16 +342,51 @@
  socket;
+%0A    private ClientHandler handler;
 %0A%0A    pu
@@ -403,16 +403,37 @@
 tClient(
+ClientHandler handler
 ) %7B%0A    
@@ -458,16 +458,25 @@
 t%22, 1666
+, handler
 );%0A    %7D
@@ -522,16 +522,39 @@
 int port
+, ClientHandler handler
 ) %7B%0A    
@@ -597,24 +597,56 @@
 ort = port;%0A
+        this.handler = handler;%0A
     %7D%0A%0A    @

add client handler to socketclient as attribute and as parameter to all constructors