Interface IPacketSender
-
- All Known Subinterfaces:
DefaultNetworkComponent,INetworkChannel,INetworkClient,de.dytanic.cloudnet.driver.network.INetworkComponent,INetworkServer
- All Known Implementing Classes:
DefaultNetworkChannel,NettyNetworkChannel,NettyNetworkClient,NettyNetworkServer
public interface IPacketSenderAll implementations of this interface, can send a packet into the network Its not specific that the sender is a client or a server.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidsendPacket(@NotNull IPacket packet)Transport a packet instance into the network to the receiver.default voidsendPacket(@NotNull IPacket... packets)Transport packet instances into the network to the receiver.voidsendPacketSync(@NotNull IPacket packet)Transport packet instances into the network to the receiver synchronously.default voidsendPacketSync(@NotNull IPacket... packets)Transport packet instances into the network to the receiver synchronously.
-
-
-
Method Detail
-
sendPacket
void sendPacket(@NotNull @NotNull IPacket packet)Transport a packet instance into the network to the receiver. The receiver will handle the packet if he knows the channel and has listeners for the channelThe packet are doesn't allow to be null
- Parameters:
packet- the packet, which should transport into the network
-
sendPacketSync
void sendPacketSync(@NotNull @NotNull IPacket packet)Transport packet instances into the network to the receiver synchronously. The receiver will handle the packets if he knows the channel and has listeners for the channelA packet are doesn't allow to be null All elements should be checked that be not null and send after that
- Parameters:
packet- the packets, which should transport into the network
-
sendPacket
default void sendPacket(@NotNull @NotNull IPacket... packets)Transport packet instances into the network to the receiver. The receiver will handle the packets if he knows the channel and has listeners for the channelA packet are doesn't allow to be null All elements should be checked that be not null and send after that
- Parameters:
packets- the packets, which should transport into the network
-
sendPacketSync
default void sendPacketSync(@NotNull @NotNull IPacket... packets)Transport packet instances into the network to the receiver synchronously. The receiver will handle the packets if he knows the channel and has listeners for the channelA packet are doesn't allow to be null All elements should be checked that be not null and send after that
- Parameters:
packets- the packets, which should transport into the network
-
-