Class NettyNetworkChannel

    • Method Detail

      • sendPacket

        public void sendPacket​(@NotNull
                               @NotNull IPacket packet)
        Description copied from interface: IPacketSender
        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 channel

        The packet are doesn't allow to be null

        Specified by:
        sendPacket in interface IPacketSender
        Parameters:
        packet - the packet, which should transport into the network
      • sendPacketSync

        public void sendPacketSync​(@NotNull
                                   @NotNull IPacket packet)
        Description copied from interface: IPacketSender
        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 channel

        A packet are doesn't allow to be null All elements should be checked that be not null and send after that

        Specified by:
        sendPacketSync in interface IPacketSender
        Parameters:
        packet - the packets, which should transport into the network
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • getChannel

        public io.netty.channel.Channel getChannel()