code: @Override
  	public void close()
  	{
  		LOG.debug("Going to close tcp connection in class: {}", this
  				.getClass().getName());
  		Event event = Events.event(null, Events.DISCONNECT);
  		if (channel.isConnected())
  		{
  			channel.write(event).addListener(ChannelFutureListener.CLOSE);
  		}
  		else
  		{
  			channel.close();
  			LOG.trace("Unable to write the Event {} with type {} to socket",
  					event, event.getType());
  		}
  	}
docs: Writes an the {@link Events#DISCONNECT} to the client, flushes
  all the pending writes and closes the channel.