com.jacobtread.blaze.PacketPushable.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of blaze-core Show documentation
Show all versions of blaze-core Show documentation
Core library for blaze networking
The newest version!
package com.jacobtread.blaze
import com.jacobtread.blaze.packet.Packet
/**
* PacketPushable Represents a class that can have packets
* sent to it. This is implemented on sessions as well as
* the networking handler so that packets can be easily sent
*
* @constructor Create empty PacketPushable
*/
interface PacketPushable {
/**
* push a new packet out to the client
*
* @param packet The packet to push
*/
fun push(packet: Packet)
fun pushAll(vararg packets: Packet) {
packets.forEach { push(it) }
}
}