// Connect session using tcp to remote jetserver
TCPPipelineFactory tcpFactory = new TCPPipelineFactory(session);
MessageBuffer<ChannelBuffer> buffer = loginHelper
.getLoginBuffer(localAddress);
Event loginEvent = Events.event(buffer, Events.LOG_IN);
// This will in turn invoke the startEventHandler when server sends
// Events.START event.
Channel channel = tcpClient.connect(tcpFactory, loginEvent);
IReliable tcpMessageSender = new NettyTCPMessageSender(channel);
session.setTcpMessageSender(tcpMessageSender);