net_channel module¶
Provides access to the net channel interfaces.
- class net_channel.NetChannel¶
Bases:
instance- __init__()¶
Raises an exception This class cannot be instantiated from Python
- property msg_handler¶
None( (_net_channel.NetChannel)arg1) -> _net_channel.NetChannelHandler
- class net_channel.NetChannelHandler¶
Bases:
instance- __init__()¶
Raises an exception This class cannot be instantiated from Python
- class net_channel.NetChannelInfo¶
Bases:
instance- __init__()¶
Raises an exception This class cannot be instantiated from Python
- get_avg_choke((NetChannelInfo)arg1, (_engines._sound.Channel)arg2) float :¶
Return the average packet choke.
- get_avg_data((NetChannelInfo)arg1, (_engines._sound.Channel)arg2) float :¶
Return the average data flow in bytes/second.
- get_avg_latency((NetChannelInfo)arg1, (_engines._sound.Channel)arg2) float :¶
Return the average latency in seconds.
- get_avg_loss((NetChannelInfo)arg1, (_engines._sound.Channel)arg2) float :¶
Return the average packet loss.
- get_avg_packets((NetChannelInfo)arg1, (_engines._sound.Channel)arg2) float :¶
Return the average packets/second.
- get_command_interpolation_amount((NetChannelInfo)arg1, (_engines._sound.Channel)arg2, (_engines._sound.Channel)arg3) float¶
- get_latency((NetChannelInfo)arg1, (_engines._sound.Channel)arg2) float :¶
Return the current latency (RTT). It’s more accurate, but jittering.
- get_packet_bytes((NetChannelInfo)arg1, (_engines._sound.Channel)arg2, (_engines._sound.Channel)arg3, (_engines._sound.Channel)arg4) int :¶
Return the group size of this packet.
- get_packet_response_latency((NetChannelInfo)arg1, (_engines._sound.Channel)arg2, (_engines._sound.Channel)arg3, (_engines._sound.Channel)arg4, (_engines._sound.Channel)arg5) None¶
- get_packet_time((NetChannelInfo)arg1, (_engines._sound.Channel)arg2, (_engines._sound.Channel)arg3) float :¶
Return the time when the packet was sent.
- get_sequence_number((NetChannelInfo)arg1, (_engines._sound.Channel)arg2) int :¶
Return the last sent sequence number.
- get_stream_progress((NetChannelInfo)arg1, (_engines._sound.Channel)arg2, (_engines._sound.Channel)arg3, (_engines._sound.Channel)arg4) bool :¶
Return TCP progress if transmitting.
- get_total_data((NetChannelInfo)arg1, (_engines._sound.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, (_engines._sound.Channel)arg2, (_engines._sound.Channel)arg3) bool :¶
Return True if the packet was not lost, dropped, choked or flushed.
- property address¶
Returns the net address of the player.
- property buffer_size¶
Return the packet history size.
- property data_rate¶
Return the send data rate in bytes/second.
- property name¶
Return the channel’s name.
- property time¶
Return the current net time.
- property time_connected¶
Returns the amount of time the player has been connected.
- property time_since_last_received¶
Return the time since the last received packet in seconds.
- property timeout_seconds¶
None( (_net_channel.NetChannelInfo)arg1) -> float
- class net_channel.NetFlow(*values)[source]¶
Bases:
IntEnumNetwork Channel Enum class.
- INCOMING = 1¶
- IN_OUT = 2¶
- OUTGOING = 0¶
- class net_channel.NetMessage¶
Bases:
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, (_bitbuffers.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, (_bitbuffers.BitBufferWrite)arg2) bool :¶
Return True if writing was OK.
- property group¶
Return the net message group.
- property name¶
Return the network message name. E.g. svc_serverinfo.
- property net_channel¶
Return the net channel this message is from/for.
- property reliable¶
Return True if the message needs reliable handling.
- property type¶
Return the module specific header tag. E.g. svc_serverinfo.