public Client(Server server, Socket s) throws IOException, MalformedHeaderException {
		this.server = server;
		this.socket = s;
		this.socketAdapter = new SocketAdapter(this.socket, this);
		this.in  = new BufferedReader(new InputStreamReader(this.socket.getInputStream()));
		this.out = new PrintWriter(this.socket.getOutputStream(), true);
		
		this.name = "User - " + (Client.idCounter++);
		
		String headers = "";
		String read;
		
		do {
			read = this.in.readLine();
			headers += read + "\n";
		}
		while (read != null && !read.trim().equals(""));
		
		Handshake handshake = new Handshake(headers);
		headers = handshake.getHeaders();
		this.channel = this.server.getChannel(handshake.getRequestHeader("_location").getValue());
		this.queue = new Queue(this.socketAdapter);
		
		
		this.out.write(headers);
		this.out.flush();
		this.channel.addClient(this);
		this.send(new STDMessage(null, "Welcome to the EQTV server"));
		//this.out = null;
	}