private void HandleConnection()
	{
		
		if (sock == null)
		{
			
			Disconnect();
			
			return;
			
		}
		
		try
		{
			
			this.hostName = sock.getInetAddress().getCanonicalHostName();
			
			in = sock.getInputStream();
			out = sock.getOutputStream();
			
			if (in == null || out == null)
			{
				
				Disconnect();
				
				return;
				
			}
			
			ready.executeEvent(new SocketHandlerReadyEvent(this, this));
			connected.executeEvent(new SocketConnectedEvent(this, this, id));
			
			startReading();
			
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		
	}