mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: network: remove some totally ununsed functions
This commit is contained in:
parent
a8de11643c
commit
12efcf1c44
@ -1711,21 +1711,6 @@ void Netchan_TransmitBits( netchan_t *chan, int length, byte *data )
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
Netchan_Transmit
|
||||
|
||||
tries to send an unreliable message to a connection, and handles the
|
||||
transmition / retransmition of the reliable messages.
|
||||
|
||||
A 0 length will still generate a packet and deal with the reliable messages.
|
||||
================
|
||||
*/
|
||||
void Netchan_Transmit( netchan_t *chan, int lengthInBytes, byte *data )
|
||||
{
|
||||
Netchan_TransmitBits( chan, lengthInBytes << 3, data );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
Netchan_Process
|
||||
|
@ -1681,68 +1681,6 @@ void NET_SendPacket( netsrc_t sock, size_t length, const void *data, netadr_t to
|
||||
NET_SendPacketEx( sock, length, data, to, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
NET_BufferToBufferCompress
|
||||
|
||||
generic fast compression
|
||||
====================
|
||||
*/
|
||||
qboolean NET_BufferToBufferCompress( byte *dest, uint *destLen, byte *source, uint sourceLen )
|
||||
{
|
||||
uint uCompressedLen = 0;
|
||||
byte *pbOut = NULL;
|
||||
|
||||
memcpy( dest, source, sourceLen );
|
||||
pbOut = LZSS_Compress( source, sourceLen, &uCompressedLen );
|
||||
|
||||
if( pbOut && uCompressedLen > 0 && uCompressedLen <= *destLen )
|
||||
{
|
||||
memcpy( dest, pbOut, uCompressedLen );
|
||||
*destLen = uCompressedLen;
|
||||
free( pbOut );
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( pbOut ) free( pbOut );
|
||||
memcpy( dest, source, sourceLen );
|
||||
*destLen = sourceLen;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
NET_BufferToBufferDecompress
|
||||
|
||||
generic fast decompression
|
||||
====================
|
||||
*/
|
||||
qboolean NET_BufferToBufferDecompress( byte *dest, uint *destLen, byte *source, uint sourceLen )
|
||||
{
|
||||
if( LZSS_IsCompressed( source ))
|
||||
{
|
||||
uint uDecompressedLen = LZSS_GetActualSize( source );
|
||||
|
||||
if( uDecompressedLen <= *destLen )
|
||||
{
|
||||
*destLen = LZSS_Decompress( source, dest );
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy( dest, source, sourceLen );
|
||||
*destLen = sourceLen;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
NET_IPSocket
|
||||
|
@ -72,8 +72,6 @@ qboolean NET_CompareAdr( const netadr_t a, const netadr_t b );
|
||||
qboolean NET_CompareBaseAdr( const netadr_t a, const netadr_t b );
|
||||
qboolean NET_CompareAdrByMask( const netadr_t a, const netadr_t b, uint prefixlen );
|
||||
qboolean NET_GetPacket( netsrc_t sock, netadr_t *from, byte *data, size_t *length );
|
||||
qboolean NET_BufferToBufferCompress( byte *dest, uint *destLen, byte *source, uint sourceLen );
|
||||
qboolean NET_BufferToBufferDecompress( byte *dest, uint *destLen, byte *source, uint sourceLen );
|
||||
void NET_SendPacket( netsrc_t sock, size_t length, const void *data, netadr_t to );
|
||||
void NET_SendPacketEx( netsrc_t sock, size_t length, const void *data, netadr_t to, size_t splitsize );
|
||||
void NET_ClearLagData( qboolean bClient, qboolean bServer );
|
||||
|
@ -294,7 +294,6 @@ qboolean Netchan_CopyNormalFragments( netchan_t *chan, sizebuf_t *msg, size_t *l
|
||||
qboolean Netchan_CopyFileFragments( netchan_t *chan, sizebuf_t *msg );
|
||||
void Netchan_CreateFragments( netchan_t *chan, sizebuf_t *msg );
|
||||
int Netchan_CreateFileFragments( netchan_t *chan, const char *filename );
|
||||
void Netchan_Transmit( netchan_t *chan, int lengthInBytes, byte *data );
|
||||
void Netchan_TransmitBits( netchan_t *chan, int lengthInBits, byte *data );
|
||||
void Netchan_OutOfBand( int net_socket, netadr_t adr, int length, byte *data );
|
||||
void Netchan_OutOfBandPrint( int net_socket, netadr_t adr, const char *format, ... ) _format( 3 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user