本文整理汇总了Java中cn.nukkit.raknet.protocol.Packet类的典型用法代码示例。如果您正苦于以下问题:Java Packet类的具体用法?Java Packet怎么用?Java Packet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Packet类属于cn.nukkit.raknet.protocol包,在下文中一共展示了Packet类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: registerPackets
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
private void registerPackets() {
// fill with dummy returning null
Arrays.fill(this.packetPool, (Packet.PacketFactory) () -> null);
//this.registerPacket(UNCONNECTED_PING.ID, UNCONNECTED_PING.class);
this.registerPacket(UNCONNECTED_PING_OPEN_CONNECTIONS.ID, new UNCONNECTED_PING_OPEN_CONNECTIONS.Factory());
this.registerPacket(OPEN_CONNECTION_REQUEST_1.ID, new OPEN_CONNECTION_REQUEST_1.Factory());
this.registerPacket(OPEN_CONNECTION_REPLY_1.ID, new OPEN_CONNECTION_REPLY_1.Factory());
this.registerPacket(OPEN_CONNECTION_REQUEST_2.ID, new OPEN_CONNECTION_REQUEST_2.Factory());
this.registerPacket(OPEN_CONNECTION_REPLY_2.ID, new OPEN_CONNECTION_REPLY_2.Factory());
this.registerPacket(UNCONNECTED_PONG.ID, new UNCONNECTED_PONG.Factory());
this.registerPacket(ADVERTISE_SYSTEM.ID, new ADVERTISE_SYSTEM.Factory());
this.registerPacket(DATA_PACKET_0.ID, new DATA_PACKET_0.Factory());
this.registerPacket(DATA_PACKET_1.ID, new DATA_PACKET_1.Factory());
this.registerPacket(DATA_PACKET_2.ID, new DATA_PACKET_2.Factory());
this.registerPacket(DATA_PACKET_3.ID, new DATA_PACKET_3.Factory());
this.registerPacket(DATA_PACKET_4.ID, new DATA_PACKET_4.Factory());
this.registerPacket(DATA_PACKET_5.ID, new DATA_PACKET_5.Factory());
this.registerPacket(DATA_PACKET_6.ID, new DATA_PACKET_6.Factory());
this.registerPacket(DATA_PACKET_7.ID, new DATA_PACKET_7.Factory());
this.registerPacket(DATA_PACKET_8.ID, new DATA_PACKET_8.Factory());
this.registerPacket(DATA_PACKET_9.ID, new DATA_PACKET_9.Factory());
this.registerPacket(DATA_PACKET_A.ID, new DATA_PACKET_A.Factory());
this.registerPacket(DATA_PACKET_B.ID, new DATA_PACKET_B.Factory());
this.registerPacket(DATA_PACKET_C.ID, new DATA_PACKET_C.Factory());
this.registerPacket(DATA_PACKET_D.ID, new DATA_PACKET_D.Factory());
this.registerPacket(DATA_PACKET_E.ID, new DATA_PACKET_E.Factory());
this.registerPacket(DATA_PACKET_F.ID, new DATA_PACKET_F.Factory());
this.registerPacket(NACK.ID, new NACK.Factory());
this.registerPacket(ACK.ID, new ACK.Factory());
}
开发者ID:CoreXDevelopment,项目名称:CoreX,代码行数:32,代码来源:SessionManager.java
示例2: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new UNCONNECTED_PING_OPEN_CONNECTIONS();
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:5,代码来源:UNCONNECTED_PING_OPEN_CONNECTIONS.java
示例3: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new DATA_PACKET_3();
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:5,代码来源:DATA_PACKET_3.java
示例4: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new DATA_PACKET_0();
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:5,代码来源:DATA_PACKET_0.java
示例5: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new CLIENT_HANDSHAKE_DataPacket();
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:5,代码来源:CLIENT_HANDSHAKE_DataPacket.java
示例6: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new DATA_PACKET_D();
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:5,代码来源:DATA_PACKET_D.java
示例7: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new SERVER_HANDSHAKE_DataPacket();
}
开发者ID:CoreXDevelopment,项目名称:CoreX,代码行数:5,代码来源:SERVER_HANDSHAKE_DataPacket.java
示例8: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new ADVERTISE_SYSTEM();
}
开发者ID:FrontierDevs,项目名称:Jenisys3,代码行数:5,代码来源:ADVERTISE_SYSTEM.java
示例9: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new UNCONNECTED_PING();
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:5,代码来源:UNCONNECTED_PING.java
示例10: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new NACK();
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:5,代码来源:NACK.java
示例11: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new OPEN_CONNECTION_REPLY_1();
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:5,代码来源:OPEN_CONNECTION_REPLY_1.java
示例12: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new UNCONNECTED_PONG();
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:5,代码来源:UNCONNECTED_PONG.java
示例13: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new OPEN_CONNECTION_REQUEST_2();
}
开发者ID:CoreXDevelopment,项目名称:CoreX,代码行数:5,代码来源:OPEN_CONNECTION_REQUEST_2.java
示例14: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new DATA_PACKET_8();
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:5,代码来源:DATA_PACKET_8.java
示例15: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new DATA_PACKET_9();
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:5,代码来源:DATA_PACKET_9.java
示例16: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new DATA_PACKET_5();
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:5,代码来源:DATA_PACKET_5.java
示例17: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new DATA_PACKET_F();
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:5,代码来源:DATA_PACKET_F.java
示例18: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new DATA_PACKET_B();
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:5,代码来源:DATA_PACKET_B.java
示例19: create
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
@Override
public Packet create() {
return new DATA_PACKET_4();
}
开发者ID:CoreXDevelopment,项目名称:CoreX,代码行数:5,代码来源:DATA_PACKET_4.java
示例20: registerPacket
import cn.nukkit.raknet.protocol.Packet; //导入依赖的package包/类
private void registerPacket(byte id, Packet.PacketFactory factory) {
this.packetPool[id & 0xFF] = factory;
}
开发者ID:CoreXDevelopment,项目名称:CoreX,代码行数:4,代码来源:SessionManager.java
注:本文中的cn.nukkit.raknet.protocol.Packet类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论