Reuse single packet instance to save overhead

This commit is contained in:
md_5 2013-03-15 21:03:45 +11:00
parent 05d76c3f67
commit 8ea5205fef

View File

@ -40,8 +40,7 @@ public class ServerConnector extends PacketHandler
public void connected(Channel channel) throws Exception public void connected(Channel channel) throws Exception
{ {
this.ch = channel; this.ch = channel;
// TODO: Fix this crap channel.write( user.handshake );
channel.write( new Packet2Handshake( user.handshake.procolVersion, user.handshake.username, user.handshake.host, user.handshake.port ) );
channel.write( PacketCDClientStatus.CLIENT_LOGIN ); channel.write( PacketCDClientStatus.CLIENT_LOGIN );
} }