struct Woozy::Packet
- Woozy::Packet
- Struct
- Value
- Object
Included Modules
- Protobuf::Message
Defined in:
protobufs/packet.pb.crwoozy.cr
Constant Summary
-
FIELDS =
{2 => {name: :client_handshake_packet, pb_type: ClientHandshakePacket, crystal_type: ClientHandshakePacket, cast_type: ClientHandshakePacket?, native: false, optional: true, repeated: false, default: nil, packed: false}, 3 => {name: :server_handshake_packet, pb_type: ServerHandshakePacket, crystal_type: ServerHandshakePacket, cast_type: ServerHandshakePacket?, native: false, optional: true, repeated: false, default: nil, packed: false}, 4 => {name: :client_disconnect_packet, pb_type: ClientDisconnectPacket, crystal_type: ClientDisconnectPacket, cast_type: ClientDisconnectPacket?, native: false, optional: true, repeated: false, default: nil, packed: false}, 5 => {name: :server_disconnect_packet, pb_type: ServerDisconnectPacket, crystal_type: ServerDisconnectPacket, cast_type: ServerDisconnectPacket?, native: false, optional: true, repeated: false, default: nil, packed: false}, 6 => {name: :server_broadcast_message_packet, pb_type: ServerBroadcastMessagePacket, crystal_type: ServerBroadcastMessagePacket, cast_type: ServerBroadcastMessagePacket?, native: false, optional: true, repeated: false, default: nil, packed: false}, 7 => {name: :client_broadcast_message_packet, pb_type: ClientBroadcastMessagePacket, crystal_type: ClientBroadcastMessagePacket, cast_type: ClientBroadcastMessagePacket?, native: false, optional: true, repeated: false, default: nil, packed: false}, 8 => {name: :server_private_message_packet, pb_type: ServerPrivateMessagePacket, crystal_type: ServerPrivateMessagePacket, cast_type: ServerPrivateMessagePacket?, native: false, optional: true, repeated: false, default: nil, packed: false}, 9 => {name: :client_private_message_packet, pb_type: ClientPrivateMessagePacket, crystal_type: ClientPrivateMessagePacket, cast_type: ClientPrivateMessagePacket?, native: false, optional: true, repeated: false, default: nil, packed: false}, 1 => {name: :timestamp, pb_type: :double, crystal_type: Float64, cast_type: Float64?, native: true, optional: true, repeated: false, default: nil, packed: false}} of Int32 => HashLiteral(Symbol, ASTNode)
-
MaxSize =
64
Constructors
- .from_bytes(bytes : Bytes) : Packet
- .new(buf : Protobuf::Buffer)
- .new(packet : Woozy::ClientHandshakePacket)
- .new(client_handshake_packet : ClientHandshakePacket | Nil = nil, server_handshake_packet : ServerHandshakePacket | Nil = nil, client_disconnect_packet : ClientDisconnectPacket | Nil = nil, server_disconnect_packet : ServerDisconnectPacket | Nil = nil, server_broadcast_message_packet : ServerBroadcastMessagePacket | Nil = nil, client_broadcast_message_packet : ClientBroadcastMessagePacket | Nil = nil, server_private_message_packet : ServerPrivateMessagePacket | Nil = nil, client_private_message_packet : ClientPrivateMessagePacket | Nil = nil, timestamp : Float64 | Nil = nil)
- .new(packet : Woozy::ServerHandshakePacket)
- .new(packet : Woozy::ClientDisconnectPacket)
- .new(packet : Woozy::ServerDisconnectPacket)
- .new(packet : Woozy::ServerBroadcastMessagePacket)
- .new(packet : Woozy::ClientBroadcastMessagePacket)
- .new(packet : Woozy::ServerPrivateMessagePacket)
- .new(packet : Woozy::ClientPrivateMessagePacket)
Class Method Summary
Instance Method Summary
- #[](key : String)
- #client_broadcast_message_packet : ClientBroadcastMessagePacket | Nil
- #client_broadcast_message_packet=(client_broadcast_message_packet : ClientBroadcastMessagePacket | Nil)
- #client_disconnect_packet : ClientDisconnectPacket | Nil
- #client_disconnect_packet=(client_disconnect_packet : ClientDisconnectPacket | Nil)
- #client_handshake_packet : ClientHandshakePacket | Nil
- #client_handshake_packet=(client_handshake_packet : ClientHandshakePacket | Nil)
- #client_private_message_packet : ClientPrivateMessagePacket | Nil
- #client_private_message_packet=(client_private_message_packet : ClientPrivateMessagePacket | Nil)
- #server_broadcast_message_packet : ServerBroadcastMessagePacket | Nil
- #server_broadcast_message_packet=(server_broadcast_message_packet : ServerBroadcastMessagePacket | Nil)
- #server_disconnect_packet : ServerDisconnectPacket | Nil
- #server_disconnect_packet=(server_disconnect_packet : ServerDisconnectPacket | Nil)
- #server_handshake_packet : ServerHandshakePacket | Nil
- #server_handshake_packet=(server_handshake_packet : ServerHandshakePacket | Nil)
- #server_private_message_packet : ServerPrivateMessagePacket | Nil
- #server_private_message_packet=(server_private_message_packet : ServerPrivateMessagePacket | Nil)
- #timestamp : Float64 | Nil
- #timestamp=(timestamp : Float64 | Nil)
- #to_protobuf(io : IO, embedded = false)
- #to_protobuf
- #to_slice : Bytes
Constructor Detail
def self.new(client_handshake_packet : ClientHandshakePacket | Nil = nil, server_handshake_packet : ServerHandshakePacket | Nil = nil, client_disconnect_packet : ClientDisconnectPacket | Nil = nil, server_disconnect_packet : ServerDisconnectPacket | Nil = nil, server_broadcast_message_packet : ServerBroadcastMessagePacket | Nil = nil, client_broadcast_message_packet : ClientBroadcastMessagePacket | Nil = nil, server_private_message_packet : ServerPrivateMessagePacket | Nil = nil, client_private_message_packet : ClientPrivateMessagePacket | Nil = nil, timestamp : Float64 | Nil = nil)
#
Class Method Detail
Instance Method Detail
def client_broadcast_message_packet=(client_broadcast_message_packet : ClientBroadcastMessagePacket | Nil)
#
def client_private_message_packet=(client_private_message_packet : ClientPrivateMessagePacket | Nil)
#
def server_broadcast_message_packet=(server_broadcast_message_packet : ServerBroadcastMessagePacket | Nil)
#
def server_private_message_packet=(server_private_message_packet : ServerPrivateMessagePacket | Nil)
#