code: public ChannelFuture connect(Session session,
  			DatagramChannel datagramChannel, InetSocketAddress serverAddress,
  			int timeout, TimeUnit unit) throws UnknownHostException,
  			InterruptedException
  	{
  		if (null == datagramChannel)
  		{
  			throw new NullPointerException(
  					"DatagramChannel passed to connect method cannot be null");
  		}
  		if (!datagramChannel.isBound())
  		{
  			throw new IllegalStateException("DatagramChannel: "
  					+ datagramChannel
  					+ " Passed to connect method is not bound");
  		}
  
  		Event event = Events.event(null, Events.CONNECT);
  		ChannelFuture future = datagramChannel.write(event, serverAddress);
  		future.addListener(new ChannelFutureListener()
  		{
  			@Override
  			public void operationComplete(ChannelFuture future)
  					throws Exception
  			{
  				if (!future.isSuccess())
  				{
  					throw new RuntimeException(future.getCause());
  				}
  			}
  		});
  		CLIENTS.put(datagramChannel.getLocalAddress(), session);
  		return future;
  	}
docs: This method will connect the datagram channel with the server and send
  the {@link Events#CONNECT} message to server.
  
  @param session
  The session for which the datagram channel is being created.
  @param datagramChannel
  The channel on which the message is to be sent to remote
  server.
  @param serverAddress
  The remote address of the server to which to send this
  message.
  @param timeout
  Amount of time to wait for the connection to happen.
  <b>NOTE</b> Since this is UDP there is actually no "real"
  connection.
  @return Returns a ChannelFuture which can be used to check the success of
  this operation. <b>NOTE</b> Success in case of UDP means message
  is sent to server. It does not mean that the server has received
  it.
  @throws UnknownHostException