net_channel module¶
Provides access to the net channel interfaces.
-
class
net_channel.
NetChannel
¶ Bases:
Boost.Python.instance
-
__init__
()¶ Raises an exception This class cannot be instantiated from Python
-
deny_file
((NetChannel)arg1, (str)file_name, (int)transfer_id) → None¶
-
request_file
((NetChannel)arg1, (str)file_name) → int¶
-
send_data
((NetChannel)arg1, (BitBufferWrite)arg2[, (bool)reliable=True]) → bool¶
-
send_file
((NetChannel)arg1, (str)file_name, (int)transfer_id) → bool¶
-
set_data_rate
((NetChannel)arg1, (float)arg2) → None¶
-
msg_handler
¶
-
-
class
net_channel.
NetChannelHandler
¶ Bases:
Boost.Python.instance
-
__init__
()¶ Raises an exception This class cannot be instantiated from Python
-
-
class
net_channel.
NetChannelInfo
¶ Bases:
Boost.Python.instance
-
__init__
()¶ Raises an exception This class cannot be instantiated from Python
-
get_avg_choke
((NetChannelInfo)arg1, (Channel)arg2) → float :¶ Return the average packet choke.
-
get_avg_data
((NetChannelInfo)arg1, (Channel)arg2) → float :¶ Return the average data flow in bytes/second.
-
get_avg_latency
((NetChannelInfo)arg1, (Channel)arg2) → float :¶ Return the average latency in seconds.
-
get_avg_loss
((NetChannelInfo)arg1, (Channel)arg2) → float :¶ Return the average packet loss.
-
get_avg_packets
((NetChannelInfo)arg1, (Channel)arg2) → float :¶ Return the average packets/second.
-
get_command_interpolation_amount
((NetChannelInfo)arg1, (Channel)arg2, (Channel)arg3) → float¶
-
get_latency
((NetChannelInfo)arg1, (Channel)arg2) → float :¶ Return the current latency (RTT). It’s more accurate, but jittering.
-
get_packet_bytes
((NetChannelInfo)arg1, (Channel)arg2, (Channel)arg3, (Channel)arg4) → int :¶ Return the group size of this packet.
-
get_packet_response_latency
((NetChannelInfo)arg1, (Channel)arg2, (Channel)arg3, (Channel)arg4, (Channel)arg5) → None¶
-
get_packet_time
((NetChannelInfo)arg1, (Channel)arg2, (Channel)arg3) → float :¶ Return the time when the packet was sent.
-
get_remote_frame_rate
((NetChannelInfo)arg1, (float)arg2, (float)arg3) → None¶
-
get_sequence_number
((NetChannelInfo)arg1, (Channel)arg2) → int :¶ Return the last sent sequence number.
-
get_stream_progress
((NetChannelInfo)arg1, (Channel)arg2, (Channel)arg3, (Channel)arg4) → bool :¶ Return TCP progress if transmitting.
-
get_total_data
((NetChannelInfo)arg1, (Channel)arg2) → int :¶ Return the total flow in/out in bytes.
-
is_loopback
((NetChannelInfo)arg1) → bool :¶ Return True if loopback.
-
is_playback
((NetChannelInfo)arg1) → bool :¶ Return True if it’s a demo playback.
-
is_timing_out
((NetChannelInfo)arg1) → bool :¶ Return True if the channel is timing out.
-
is_valid_packet
((NetChannelInfo)arg1, (Channel)arg2, (Channel)arg3) → bool :¶ Return True if the packet was not lost, dropped, choked or flushed.
-
address
¶ Returns the net address of the player.
-
buffer_size
¶ Return the packet history size.
-
data_rate
¶ Return the send data rate in bytes/second.
-
name
¶ Return the channel’s name.
-
time
¶ Return the current net time.
-
time_connected
¶ Returns the amount of time the player has been connected.
-
time_since_last_received
¶ Return the time since the last received packet in seconds.
-
timeout_seconds
¶
-
-
class
net_channel.
NetFlow
[source]¶ Bases:
enum.IntEnum
Network Channel Enum class.
-
INCOMING
= <NetFlow.INCOMING: 1>¶
-
IN_OUT
= <NetFlow.IN_OUT: 2>¶
-
OUTGOING
= <NetFlow.OUTGOING: 0>¶
-
-
class
net_channel.
NetMessage
¶ Bases:
Boost.Python.instance
-
__init__
()¶ Raises an exception This class cannot be instantiated from Python
-
process
((NetMessage)arg1) → bool :¶ Call the recently set handler to process this message.
-
read_from_buffer
((NetMessage)arg1, (BitBufferRead)arg2) → bool :¶ Return True if parsing was OK.
-
to_string
((NetMessage)arg1) → str :¶ Return a human readable string about the message content.
-
write_to_buffer
((NetMessage)arg1, (BitBufferWrite)arg2) → bool :¶ Return True if writing was OK.
-
group
¶ Return the net message group.
-
name
¶ Return the network message name. E.g. svc_serverinfo.
-
net_channel
¶ Return the net channel this message is from/for.
-
reliable
¶ Return True if the message needs reliable handling.
-
type
¶ Return the module specific header tag. E.g. svc_serverinfo.
-