struct
NatPMP::MappingPacket
- NatPMP::MappingPacket
- Struct
- Value
- Object
Overview
You can use this struct to craft your own mapping packets in case you want to handle it all by yourself.
# This creates a mapping that you can use to send trough a Socket
packet_io = NatPMP::MappingPacket.new(25565, 25565, 1, 3600).to_io
packet_slice = NatPMP::MappingPacket.new(25565, 25565, 1, 3600).to_slice
Defined in:
natpmp.crConstructors
Instance Method Summary
-
#to_io
Converts the struct instance variables to IO.
-
#to_slice
Converts the struct instance variables to an StaticArray.
Constructor Detail
def self.new(internal_port : UInt16, external_port : UInt16, op : UInt8 = 1, lifetime : UInt32 = 7200)
#
Instance Method Detail
def to_slice
#
Converts the struct instance variables to an StaticArray.
Side Note: This is not actually a Slice, it's an StaticArray so I don't think this member function should be called like this.