INetChannel

C++
struct INetChannel : public INetMessageSink {
  struct SPerformanceMetrics {
    ICVar * pBitRateDesired;
    ICVar * pBitRateToleranceHigh;
    ICVar * pBitRateToleranceLow;
    ICVar * pPacketRateDesired;
    ICVar * pIdlePacketRateDesired;
    ICVar * pPacketRateToleranceHigh;
    ICVar * pPacketRateToleranceLow;
  };
  struct SStatistics {
    float bandwidthUp;
    float bandwidthDown;
  };
};
File

INetwork.h

INetChannel::SPerformanceMetrics Structure
C++
File

INetwork.h

Notes

See CNetCVars - net_defaultChannelfor defaults

INetChannel::SPerformanceMetrics::pBitRateDesired Data Member
C++
ICVar * pBitRateDesired;
Description

Desired bit rate (in bits-per-second).

INetChannel::SPerformanceMetrics::pBitRateToleranceHigh Data Member
C++
ICVar * pBitRateToleranceHigh;
Description

Bit rate targets can climb to bitRateDesired * (1.0f + bitRateToleranceHigh).

INetChannel::SPerformanceMetrics::pBitRateToleranceLow Data Member
C++
ICVar * pBitRateToleranceLow;
Description

Bit rate targets can fall to bitRateDesired * (1.0f - bitRateToleranceLow).

INetChannel::SPerformanceMetrics::pIdlePacketRateDesired Data Member
C++
ICVar * pIdlePacketRateDesired;
Description

Desired packet rate when nothing urgent needs to be sent (in packets-per-second).

INetChannel::SPerformanceMetrics::pPacketRateDesired Data Member
C++
ICVar * pPacketRateDesired;
Description

Desired packet rate (in packets-per-second)

INetChannel::SPerformanceMetrics::pPacketRateToleranceHigh Data Member
C++
ICVar * pPacketRateToleranceHigh;
Description

Packet rate targets can climb to packetRateDesired * (1.0f + packetRateToleranceHigh).

INetChannel::SPerformanceMetrics::pPacketRateToleranceLow Data Member
C++
ICVar * pPacketRateToleranceLow;
Description

Packet rate targets can fall to packetRateDesired * (1.0f - packetRateToleranceLow).

INetChannel::SPerformanceMetrics::SPerformanceMetrics Constructor
C++
SPerformanceMetrics();
INetChannel::SStatistics Structure
C++
struct SStatistics {
  float bandwidthUp;
  float bandwidthDown;
};
File

INetwork.h

INetChannel::SStatistics::bandwidthDown Data Member
C++
float bandwidthDown;
INetChannel::SStatistics::bandwidthUp Data Member
C++
float bandwidthUp;
INetChannel::SStatistics::SStatistics Constructor
C++
SStatistics();
INetChannel::AddSendable Method
C++
virtual bool AddSendable(INetSendablePtr pMsg, int numAfterHandle, const SSendableHandle * afterHandle, SSendableHandle * handle) = 0;
Description

Lower level, more advanced sending interface; enforces sending after afterHandle, and returns a handle to this message in handle.

INetChannel::AddWaitForFileSyncComplete Method
C++
virtual void AddWaitForFileSyncComplete(IContextEstablisher * pEst, EContextViewState when) = 0;
Description

add a wait for file sync complete marker to a context establisher

INetChannel::AllowVoiceTransmission Method
C++
virtual void AllowVoiceTransmission(bool allow) = 0;
INetChannel::CallUpdate Method
C++
virtual void CallUpdate(CTimeValue time);
INetChannel::CallUpdateIfNecessary Method
C++
virtual void CallUpdateIfNecessary(CTimeValue time, bool force);
INetChannel::DeclareWitness Method
C++
virtual void DeclareWitness(EntityId id) = 0;
Description

Declares an entity that "witnesses" the world... allows prioritization.

INetChannel::Disconnect Method
C++
virtual void Disconnect(EDisconnectionCause cause, const char * fmt, ...) = 0;
Description

Disconnects this channel.

INetChannel::DispatchRMI Method
C++
virtual void DispatchRMI(IRMIMessageBodyPtr pBody) = 0;
Description

Dispatches a remote method invocation.

INetChannel::GetChannelConnectionState Method
C++
virtual EChannelConnectionState GetChannelConnectionState() const = 0;
INetChannel::GetChannelMask Method
C++
virtual ChannelMaskType GetChannelMask() = 0;
INetChannel::GetContextViewState Method
C++
virtual EContextViewState GetContextViewState() const = 0;
INetChannel::GetContextViewStateDebugCode Method
C++
virtual int GetContextViewStateDebugCode() const = 0;
INetChannel::GetGameChannel Method
C++
virtual IGameChannel * GetGameChannel() = 0;
INetChannel::GetLocalChannelID Method
C++
virtual TNetChannelID GetLocalChannelID() = 0;
Description

Gets the local channel ID.

INetChannel::GetMemoryStatistics Method
C++
virtual void GetMemoryStatistics(ICrySizer* pSizer, bool countingThis = false) = 0;
INetChannel::GetName Method
C++
virtual const char * GetName() = 0;
Description

Gets a descriptive string describing the channel.

INetChannel::GetNickname Method
C++
virtual const char* GetNickname() = 0;
Description

Gets a descriptive string describing the channel.

INetChannel::GetPing Method
C++
virtual float GetPing(bool smoothed) const = 0;
Description

Gets the current ping.

INetChannel::GetProfileId Method
C++
virtual int GetProfileId() const = 0;
Description

Gets the unique and persistent profile id for this client (profile id is associated with the user account).

INetChannel::GetRemoteChannelID Method
C++
virtual TNetChannelID GetRemoteChannelID() = 0;
Description

Gets the remote channel ID.

INetChannel::GetRemoteTime Method
C++
virtual CTimeValue GetRemoteTime() const = 0;
Description

Gets the remote time.

INetChannel::GetSession Method
C++
virtual CrySessionHandle GetSession() const = 0;
INetChannel::GetStatistics Method
C++
virtual const SStatistics& GetStatistics() = 0;
Description

Gets current channel based statistics for this channel.

INetChannel::GetTimeSinceRecv Method
C++
virtual CTimeValue GetTimeSinceRecv() const = 0;
Description

Gets the time since data was last received on this channel.

INetChannel::HasGameRequestedUpdate Method
C++
virtual bool HasGameRequestedUpdate() = 0;
INetChannel::IsConnectionEstablished Method
C++
virtual bool IsConnectionEstablished() const = 0;
Description

Checks if this connection has been successfully established.

INetChannel::IsFakeChannel Method
C++
virtual bool IsFakeChannel() const = 0;
Description

Checks if this channel is a fake one.

Notes

ContextView extensions will not be created for fake channels.

Example

Demorecording, debug channel etc.

INetChannel::IsInTransition Method
C++
virtual bool IsInTransition() = 0;
Description

is this channel currently transitioning between levels?

INetChannel::IsLocal Method
C++
virtual bool IsLocal() const = 0;
Description

Checks if this channel is connected locally.

INetChannel::IsMigratingChannel Method
C++
virtual bool IsMigratingChannel() const = 0;
INetChannel::IsPreordered Method
C++
virtual bool IsPreordered() const = 0;
Description

Checks if remote channel have pre-ordered copy.

INetChannel::IsSufferingHighLatency Method
C++
virtual bool IsSufferingHighLatency(CTimeValue nTime) const = 0;
Description

Checks if the system is suffering high latency.

INetChannel::IsTimeReady Method
C++
virtual bool IsTimeReady() const = 0;
Description

has timing synchronization reached stabilization

INetChannel::RemoveSendable Method
C++
virtual bool RemoveSendable(SSendableHandle handle) = 0;
Description

Undoes a sent message if possible.

INetChannel::RequestUpdate Method
C++
virtual void RequestUpdate(CTimeValue time) = 0;
INetChannel::SendMsg Method
C++
virtual void SendMsg(INetMessage *) = 0;
Description

Sends a message to the other end of this channel.

INetChannel::SetChannelMask Method
C++
virtual void SetChannelMask(ChannelMaskType newMask) = 0;
INetChannel::SetClient Method
C++
virtual void SetClient(INetContext* pNetContext, bool cheatProtection) = 0;
INetChannel::SetMigratingChannel Method
C++
virtual void SetMigratingChannel(bool bIsMigrating) = 0;
INetChannel::SetNickname Method
C++
virtual void SetNickname(const char* name) = 0;
Description

Sets a persistent nickname for this channel (MP playername).

INetChannel::SetPassword Method
C++
virtual void SetPassword(const char * password) = 0;
Parameters
Parameters
Description
const char * password
The new password string; will be checked at every context change if the length>0.
Description

Sets/resets the server password.

INetChannel::SetPeer Method
C++
virtual void SetPeer(INetContext* pNetContext, bool cheatProtection) = 0;
INetChannel::SetPerformanceMetrics Method
C++
virtual void SetPerformanceMetrics(SPerformanceMetrics * pMetrics) = 0;
Parameters
Parameters
Description
SPerformanceMetrics * pMetrics
An SPerformanceMetrics structure describing these tolerances.
Description

Sets tolerances on packet delivery rate, bandwidth consumption, packet size, etc...

INetChannel::SetServer Method
C++
virtual void SetServer(INetContext* pNetContext, bool cheatProtection) = 0;
INetChannel::SubstituteSendable Method
C++
virtual bool SubstituteSendable(INetSendablePtr pMsg, int numAfterHandle, const SSendableHandle * afterHandle, SSendableHandle * handle) = 0;
Description

Like AddSendable, but removes an old message if it still exists.

See Also
INetChannel::TimeSinceVoiceReceipt Method
C++
virtual CTimeValue TimeSinceVoiceReceipt(EntityId id) = 0;
INetChannel::TimeSinceVoiceTransmission Method
C++
virtual CTimeValue TimeSinceVoiceTransmission() = 0;