public static ChannelBuffer getLoginBuffer(String refKey, ChannelBuffer udpAddress)
{
ChannelBuffer opcode = ChannelBuffers.buffer(1);
ChannelBuffer protocol = ChannelBuffers.buffer(1);
opcode.writeByte(Events.LOG_IN);
protocol.writeByte(Events.PROTCOL_VERSION);
String username = "user";
String password = "pass";
// write username,password and ref key.
ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(opcode,protocol,
NettyUtils.writeStrings(username,password,refKey),udpAddress);