1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-23 01:59:43 +08:00

Updated INetChannel.

This commit is contained in:
Nicholas Hastings 2015-03-14 09:42:36 -04:00
parent a003cc3ca3
commit 9ab343dff8
2 changed files with 10 additions and 9 deletions

View File

@ -60,12 +60,12 @@ public:
virtual void ProcessPacket( struct netpacket_s* packet, bool bHasHeader ) = 0;
virtual bool SendNetMsg(INetMessage &msg, bool bForceReliable = false, bool bVoice = false ) = 0;
#ifdef _LINUX
#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 bool SendFile(const char *filename, unsigned int transferID, bool bIsReplayDemoFile = false ) = 0;
virtual void DenyFile(const char *filename, unsigned int transferID, bool bIsReplayDemoFile = false ) = 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;
@ -87,7 +87,8 @@ public:
virtual void SetFileTransmissionMode(bool bBackgroundMode) = 0;
virtual void SetCompressionMode( bool bUseCompression ) = 0;
virtual unsigned int RequestFile(const char *filename) = 0;
virtual unsigned int RequestFile(const char *filename, bool bIsReplayDemoFile = false ) = 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;

View File

@ -28,19 +28,19 @@ public:
virtual void ConnectionClosing(const char *reason) = 0; // network channel is being closed by remote site
virtual void ConnectionCrashed(const char *reason) = 0; // network error occured
virtual void ConnectionCrashed(const char *reason) = 0; // network error occurred
virtual void PacketStart(int incoming_sequence, int outgoing_acknowledged) = 0; // called each time a new packet arrived
virtual void PacketEnd( void ) = 0; // all messages has been parsed
virtual void FileRequested(const char *fileName, unsigned int transferID, bool isReplayDemoFile) = 0; // other side request a file for download
virtual void FileRequested(const char *fileName, unsigned int transferID, bool bIsReplayDemoFile = false ) = 0; // other side request a file for download
virtual void FileReceived(const char *fileName, unsigned int transferID, bool isReplayDemoFile) = 0; // we received a file
virtual void FileReceived(const char *fileName, unsigned int transferID, bool bIsReplayDemoFile = false ) = 0; // we received a file
virtual void FileDenied(const char *fileName, unsigned int transferID, bool isReplayDemoFile) = 0; // a file request was denied by other side
virtual void FileDenied(const char *fileName, unsigned int transferID, bool bIsReplayDemoFile = false ) = 0; // a file request was denied by other side
virtual void FileSent(const char *fileName, unsigned int transferID, bool isReplayDemoFile) = 0; // we sent a file
virtual void FileSent(const char *fileName, unsigned int transferID, bool bIsReplayDemoFile = false ) = 0;
};
#define PROCESS_NET_MESSAGE( name ) \