Previous topic

udpdeserializer

Next topic

udpserializer

This Page

udpdispatcher

class pyogp.lib.base.message.udpdispatcher.PackFlags
class pyogp.lib.base.message.udpdispatcher.DataUnpacker
unpack_data(data, data_type, start_index=-1, var_size=-1, endian_type='')
class pyogp.lib.base.message.udpdispatcher.CircuitManager

Manages a collection of circuits and provides some higher-level functionality to do so.

add_circuit(host, packet_in_id)
get_circuit(host)
get_unacked_circuits()
is_circuit_alive(host)
remove_circuit_data(host)
class pyogp.lib.base.message.udpdispatcher.MsgBlockType
classmethod MBT_as_string(typenum)
class pyogp.lib.base.message.udpdispatcher.EndianType
class pyogp.lib.base.message.udpdispatcher.MsgFrequency
class pyogp.lib.base.message.udpdispatcher.UDPMessageSerializer(message_template=None)

an adpater for serializing a IUDPMessage into the UDP message format

This class builds messages at its high level, that is, keeping that data in data structure form. A serializer should be used on the message produced by this so that it can be sent over a network.

initialize the adapter

build_block(template_block, message_data)
serialize(context)
Builds the message by serializing the data. Creates a packet ready to be sent.
set_current_template()
establish the template for the current packet
class pyogp.lib.base.message.udpdispatcher.PacketLayout
class pyogp.lib.base.message.udpdispatcher.MsgType
classmethod MVT_as_string(typenum)
class pyogp.lib.base.message.udpdispatcher.Message(name, *args)

an active message

add_ack(packet_id)
add_block(block)
add_data(block_name, var_name, data, data_size)
data()
a string representation of a packet
get_block(block_name)
get_var(block, variable)
parse_blocks(block_list)
parse the Block() instances in the args
class pyogp.lib.base.message.udpdispatcher.UDPDispatcher(udp_client=None, settings=None, message_handler=None, message_template=None)
find_circuit(host)
has_unacked()
process_acks()
resends all of our messages that were unacked, and acks all the messages that others are waiting to be acked.
receive_check(host, msg_buf, msg_size)
send_message(message, host)
send_reliable(message, host, retries)
Wants to be acked
send_retry(message, host)
This is a retry because we didn’t get acked
class pyogp.lib.base.message.udpdispatcher.UDPMessageDeserializer(message_handler=None, settings=None, message_template=None)
deserialize(context)
zero_code_expand(msg_buf, msg_size)
made this call more generic due to changes in how zero_code_expand is called. no more header issues in actual call. Its taken care of earlier in process
class pyogp.lib.base.message.udpdispatcher.Block(name, **kwargs)

base representation of a block Block expects a name, and kwargs for variables (var_name = value)

add_variable(var)
get_variable(var_name)
get_variables()