public void Read(ClientWrapper state, MSGBuffer buffer, object[] Arguments) { int Protocol = buffer.ReadVarInt(); string Host = buffer.ReadString(); short Port = buffer.ReadShort(); int State = buffer.ReadVarInt(); switch (State) { case 1: HandleStatusRequest(state, buffer); break; case 2: HandleLoginRequest(state, buffer); break; } }