INetChannel

#include

Inherits INetMessageSink.

Classes

struct SPerformanceMetrics

Public Member Functions

virtual ChannelMaskType GetChannelMask ()=0
virtual void SetChannelMask (ChannelMaskType newMask)=0
virtual void SetClient (INetContext *pNetContext)=0
virtual void SetServer (INetContext *pNetContext)=0
virtual void SetPassword (const char *password)=0
virtual void SetPerformanceMetrics (SPerformanceMetrics *pMetrics)=0
virtual void Disconnect (EDisconnectionCause cause, const char *fmt,...)=0
Disconnects this channel.
virtual void SendMsg (INetMessage *)=0
Sends a message to the other end of this channel.
virtual bool SubstituteSendable (INetSendablePtr pMsg, int numAfterHandle, const SSendableHandle *afterHandle, SSendableHandle *handle)=0
Like AddSendable, but removes an old message if it still exists.
virtual bool AddSendable (INetSendablePtr pMsg, int numAfterHandle, const SSendableHandle *afterHandle, SSendableHandle *handle)=0
Lower level, more advanced sending interface; enforces sending after afterHandle, and returns a handle to this message in handle.
virtual bool RemoveSendable (SSendableHandle handle)=0
Undoes a sent message if possible.
virtual const SStatistics & GetStatistics ()=0
Gets current channel based statistics for this channel.
virtual CTimeValue GetRemoteTime () const =0
Gets the remote time.
virtual float GetPing (bool smoothed) const =0
Gets the current ping.
virtual bool IsSufferingHighLatency (CTimeValue nTime) const =0
Checks if the system is suffering high latency.
virtual CTimeValue GetTimeSinceRecv () const =0
Gets the time since data was last received on this channel.
virtual void DispatchRMI (IRMIMessageBodyPtr pBody)=0
Dispatches a remote method invocation.
virtual void DeclareWitness (EntityId id)=0
Declares an entity that "witnesses" the world... allows prioritization.
virtual bool IsLocal () const =0
Checks if this channel is connected locally.
virtual bool IsConnectionEstablished () const =0
Checks if this connection has been successfully established.
virtual bool IsFakeChannel () const =0
virtual const char * GetNickname ()=0
Gets a descriptive string describing the channel.
virtual const char * GetName ()=0
Gets a descriptive string describing the channel.
virtual void SetNickname (const char *name)=0
Sets a persistent nickname for this channel (MP playername).
virtual TNetChannelID GetLocalChannelID ()=0
Gets the local channel ID.
virtual TNetChannelID GetRemoteChannelID ()=0
Gets the remote channel ID.
virtual CrySessionHandle GetSession () const =0
virtual IGameChannel * GetGameChannel ()=0
virtual bool IsInTransition ()=0
Is this channel currently transitioning between levels?
virtual EContextViewState GetContextViewState () const =0
virtual EChannelConnectionState GetChannelConnectionState () const =0
virtual int GetContextViewStateDebugCode () const =0
virtual bool IsTimeReady () const =0
Has timing synchronization reached stabilization?
virtual int GetProfileId () const =0
Gets the unique and persistent profile id for this client (profile id is associated with the user account).
virtual bool IsPreordered () const =0
Does remote channel have pre-ordered copy?
virtual void GetMemoryStatistics (ICrySizer *pSizer, bool countingThis=false)=0
virtual void AddWaitForFileSyncComplete (IContextEstablisher *pEst, EContextViewState when)=0
Add a wait for file sync complete marker to a context establisher.
virtual void CallUpdate (CTimeValue time)
virtual void CallUpdateIfNecessary (CTimeValue time, bool force)
virtual void RequestUpdate (CTimeValue time)=0
virtual bool HasGameRequestedUpdate ()=0
virtual void SetMigratingChannel (bool bIsMigrating)=0
virtual bool IsMigratingChannel () const =0
virtual bool GetRemoteNetAddress (uint32 &uip, uint16 &port, bool firstLocal=true)=0
virtual CTimeValue TimeSinceVoiceTransmission ()=0
virtual CTimeValue TimeSinceVoiceReceipt (EntityId id)=0
virtual void AllowVoiceTransmission (bool allow)=0
virtual void LogRMIBenchmark (ERMIBenchmarkAction action, const SRMIBenchmarkParams &params, void(*pCallback)(ERMIBenchmarkLogPoint point0, ERMIBenchmarkLogPoint point1, int64 delay, void *pUserData), void *pUserData)=0

Detailed Description

Main interface for a connection to another engine instance i.e. The server has one net channel per client, each client has a single net channel for the server.

Member Function Documentation

◆ IsFakeChannel()

virtual bool INetChannel::IsFakeChannel ( ) const
pure virtual

Checks if this channel is a fake one. Example: Demorecording, debug channel etc.

Note
ContextView extensions will not be created for fake channels.

◆ SetPassword()

virtual void INetChannel::SetPassword ( const char * password)
pure virtual

Sets/resets the server password.

Parameters
passwordNew password string; will be checked at every context change if the length > 0.

◆ SetPerformanceMetrics()

virtual void INetChannel::SetPerformanceMetrics ( SPerformanceMetrics * pMetrics)
pure virtual

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

Parameters
pMetricsAn SPerformanceMetrics structure describing these tolerances.