diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /sp/src/public/inetchannel.h | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'sp/src/public/inetchannel.h')
| -rw-r--r-- | sp/src/public/inetchannel.h | 182 |
1 files changed, 91 insertions, 91 deletions
diff --git a/sp/src/public/inetchannel.h b/sp/src/public/inetchannel.h index 6a26b062..88564b57 100644 --- a/sp/src/public/inetchannel.h +++ b/sp/src/public/inetchannel.h @@ -1,91 +1,91 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================//
-
-#ifndef INETCHANNEL_H
-#define INETCHANNEL_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include "tier0/platform.h"
-#include "inetchannelinfo.h"
-#include "tier1/bitbuf.h"
-
-class IDemoRecorder;
-class INetMessage;
-class INetChannelHandler;
-class INetChannelInfo;
-typedef struct netpacket_s netpacket_t;
-typedef struct netadr_s netadr_t;
-
-abstract_class INetChannel : public INetChannelInfo
-{
-public:
- virtual ~INetChannel( void ) {};
-
- virtual void SetDataRate(float rate) = 0;
- virtual bool RegisterMessage(INetMessage *msg) = 0;
- virtual bool StartStreaming( unsigned int challengeNr ) = 0;
- virtual void ResetStreaming( void ) = 0;
- virtual void SetTimeout(float seconds) = 0;
- virtual void SetDemoRecorder(IDemoRecorder *recorder) = 0;
- virtual void SetChallengeNr(unsigned int chnr) = 0;
-
- virtual void Reset( void ) = 0;
- virtual void Clear( void ) = 0;
- virtual void Shutdown(const char *reason) = 0;
-
- virtual void ProcessPlayback( void ) = 0;
- virtual bool ProcessStream( void ) = 0;
- virtual void ProcessPacket( struct netpacket_s* packet, bool bHasHeader ) = 0;
-
- virtual bool SendNetMsg(INetMessage &msg, bool bForceReliable = false, bool bVoice = false ) = 0;
-#ifdef POSIX
- FORCEINLINE bool SendNetMsg(INetMessage const &msg, bool bForceReliable = false, bool bVoice = false ) { return SendNetMsg( *( (INetMessage *) &msg ), bForceReliable, bVoice ); }
-#endif
- virtual bool SendData(bf_write &msg, bool bReliable = true) = 0;
- virtual bool SendFile(const char *filename, unsigned int transferID) = 0;
- virtual void DenyFile(const char *filename, unsigned int transferID) = 0;
- virtual void RequestFile_OLD(const char *filename, unsigned int transferID) = 0; // get rid of this function when we version the
- virtual void SetChoked( void ) = 0;
- virtual int SendDatagram(bf_write *data) = 0;
- virtual bool Transmit(bool onlyReliable = false) = 0;
-
- virtual const netadr_t &GetRemoteAddress( void ) const = 0;
- virtual INetChannelHandler *GetMsgHandler( void ) const = 0;
- virtual int GetDropNumber( void ) const = 0;
- virtual int GetSocket( void ) const = 0;
- virtual unsigned int GetChallengeNr( void ) const = 0;
- virtual void GetSequenceData( int &nOutSequenceNr, int &nInSequenceNr, int &nOutSequenceNrAck ) = 0;
- virtual void SetSequenceData( int nOutSequenceNr, int nInSequenceNr, int nOutSequenceNrAck ) = 0;
-
- virtual void UpdateMessageStats( int msggroup, int bits) = 0;
- virtual bool CanPacket( void ) const = 0;
- virtual bool IsOverflowed( void ) const = 0;
- virtual bool IsTimedOut( void ) const = 0;
- virtual bool HasPendingReliableData( void ) = 0;
-
- virtual void SetFileTransmissionMode(bool bBackgroundMode) = 0;
- virtual void SetCompressionMode( bool bUseCompression ) = 0;
- virtual unsigned int RequestFile(const char *filename) = 0;
- virtual float GetTimeSinceLastReceived( void ) const = 0; // get time since last received packet in seconds
-
- virtual void SetMaxBufferSize(bool bReliable, int nBytes, bool bVoice = false ) = 0;
-
- virtual bool IsNull() const = 0;
- virtual int GetNumBitsWritten( bool bReliable ) = 0;
- virtual void SetInterpolationAmount( float flInterpolationAmount ) = 0;
- virtual void SetRemoteFramerate( float flFrameTime, float flFrameTimeStdDeviation ) = 0;
-
- // Max # of payload bytes before we must split/fragment the packet
- virtual void SetMaxRoutablePayloadSize( int nSplitSize ) = 0;
- virtual int GetMaxRoutablePayloadSize() = 0;
-
- virtual int GetProtocolVersion() = 0;
-};
-
-
-#endif // INETCHANNEL_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef INETCHANNEL_H +#define INETCHANNEL_H +#ifdef _WIN32 +#pragma once +#endif + +#include "tier0/platform.h" +#include "inetchannelinfo.h" +#include "tier1/bitbuf.h" + +class IDemoRecorder; +class INetMessage; +class INetChannelHandler; +class INetChannelInfo; +typedef struct netpacket_s netpacket_t; +typedef struct netadr_s netadr_t; + +abstract_class INetChannel : public INetChannelInfo +{ +public: + virtual ~INetChannel( void ) {}; + + virtual void SetDataRate(float rate) = 0; + virtual bool RegisterMessage(INetMessage *msg) = 0; + virtual bool StartStreaming( unsigned int challengeNr ) = 0; + virtual void ResetStreaming( void ) = 0; + virtual void SetTimeout(float seconds) = 0; + virtual void SetDemoRecorder(IDemoRecorder *recorder) = 0; + virtual void SetChallengeNr(unsigned int chnr) = 0; + + virtual void Reset( void ) = 0; + virtual void Clear( void ) = 0; + virtual void Shutdown(const char *reason) = 0; + + virtual void ProcessPlayback( void ) = 0; + virtual bool ProcessStream( void ) = 0; + virtual void ProcessPacket( struct netpacket_s* packet, bool bHasHeader ) = 0; + + virtual bool SendNetMsg(INetMessage &msg, bool bForceReliable = false, bool bVoice = false ) = 0; +#ifdef POSIX + FORCEINLINE bool SendNetMsg(INetMessage const &msg, bool bForceReliable = false, bool bVoice = false ) { return SendNetMsg( *( (INetMessage *) &msg ), bForceReliable, bVoice ); } +#endif + virtual bool SendData(bf_write &msg, bool bReliable = true) = 0; + virtual bool SendFile(const char *filename, unsigned int transferID) = 0; + virtual void DenyFile(const char *filename, unsigned int transferID) = 0; + virtual void RequestFile_OLD(const char *filename, unsigned int transferID) = 0; // get rid of this function when we version the + virtual void SetChoked( void ) = 0; + virtual int SendDatagram(bf_write *data) = 0; + virtual bool Transmit(bool onlyReliable = false) = 0; + + virtual const netadr_t &GetRemoteAddress( void ) const = 0; + virtual INetChannelHandler *GetMsgHandler( void ) const = 0; + virtual int GetDropNumber( void ) const = 0; + virtual int GetSocket( void ) const = 0; + virtual unsigned int GetChallengeNr( void ) const = 0; + virtual void GetSequenceData( int &nOutSequenceNr, int &nInSequenceNr, int &nOutSequenceNrAck ) = 0; + virtual void SetSequenceData( int nOutSequenceNr, int nInSequenceNr, int nOutSequenceNrAck ) = 0; + + virtual void UpdateMessageStats( int msggroup, int bits) = 0; + virtual bool CanPacket( void ) const = 0; + virtual bool IsOverflowed( void ) const = 0; + virtual bool IsTimedOut( void ) const = 0; + virtual bool HasPendingReliableData( void ) = 0; + + virtual void SetFileTransmissionMode(bool bBackgroundMode) = 0; + virtual void SetCompressionMode( bool bUseCompression ) = 0; + virtual unsigned int RequestFile(const char *filename) = 0; + virtual float GetTimeSinceLastReceived( void ) const = 0; // get time since last received packet in seconds + + virtual void SetMaxBufferSize(bool bReliable, int nBytes, bool bVoice = false ) = 0; + + virtual bool IsNull() const = 0; + virtual int GetNumBitsWritten( bool bReliable ) = 0; + virtual void SetInterpolationAmount( float flInterpolationAmount ) = 0; + virtual void SetRemoteFramerate( float flFrameTime, float flFrameTimeStdDeviation ) = 0; + + // Max # of payload bytes before we must split/fragment the packet + virtual void SetMaxRoutablePayloadSize( int nSplitSize ) = 0; + virtual int GetMaxRoutablePayloadSize() = 0; + + virtual int GetProtocolVersion() = 0; +}; + + +#endif // INETCHANNEL_H |