CNetChan
CNetChan
Metatable function | Description |
---|---|
__tostring |
Returns a formated string of the CNetChan -> CNetChan [channel name] |
__index |
Used to find the functions on the metatable and access saved variables |
__newindex |
Used to allow one to save variables on the object |
Methods
string CNetChan:GetAddress( )
Returns the Address as
ip:port
number CNetChan:GetBufferSize( )
number CNetChan:GetChallengeNr( )
Returns the challenge number.
number CNetChan:GetChokedPackets( )
boolean CNetChan:GetClearedDuringProcessing( )
number CNetChan:GetClearTime( )
function CNetChan:GetConnectionClosingCallback( )
Returns the current connection closing callback function.
Can be set using CNetChan:SetConnectionClosingCallback
Can be set using CNetChan:SetConnectionClosingCallback
function CNetChan:GetConnectionCrashedCallback( )
Returns the current connection crashed callback function.
Can be set using CNetChan:SetConnectionCrashedCallback
Can be set using CNetChan:SetConnectionCrashedCallback
function CNetChan:GetConnectionStartCallback( )
Returns the current connection start callback function.
Can be set using CNetChan:SetConnectionStartCallback
Can be set using CNetChan:SetConnectionStartCallback
number CNetChan:GetConnectTime( )
number CNetChan:GetDataRate( )
number CNetChan:GetDropNumber( )
number CNetChan:GetInReliableState( )
number CNetChan:GetInSequenceNr( )
number CNetChan:GetLastReceived( )
number CNetChan:GetMaxReliablePayloadSize( )
function CNetChan:GetMessageCallback( )
Returns the current message callback function.
Can be set using CNetChan:SetMessageCallback
Can be set using CNetChan:SetMessageCallback
number CNetChan:GetOutReliableState( )
number CNetChan:GetOutSequenceNr( )
number CNetChan:GetOutSequenceNrAck( )
boolean CNetChan:GetProcessingMessages( )
Returns
true
if the channel is currently processing messages.
number CNetChan:GetProtocolVersion( )
bf_write CNetChan:GetStreamReliable( )
Returns the reliable stream used by net messages.
number CNetChan:GetStreamSocket( )
bf_write CNetChan:GetStreamUnreliable( )
Returns the unreliable stream used by net messages.
bf_write CNetChan:GetStreamVoice( )
Returns the voice stream used by the voice chat.
This function errors if the client doesn't have a valid
CNetChannel
number CNetChan:GetTimeConnected( )
number CNetChan:GetTimeout( )
number CNetChan:GetTimeoutSeconds( )
number CNetChan:GetTimeSinceLastReceived( )
boolean CNetChan:ProcessStream( )
Processes all pending incoming net messages.
Returns
Returns
true
on success.
Sends out the given buffer as a message.
Returns
Returns
true
on success.
CNetChan:SetChoked()
CNetChan:SetCompressionMode( boolean compression = false )
CNetChan:SetConnectionClosingCallback( function callback )
Sets the callback function for when a connection is closed.
Can be returned using CNetChan:GetConnectionClosingCallback
Can be returned using CNetChan:GetConnectionClosingCallback
CNetChan:SetConnectionCrashedCallback( function callback )
Sets the callback function for when a connection has crashed.
Can be returned using CNetChan:GetConnectionCrashedCallback
Can be returned using CNetChan:GetConnectionCrashedCallback
CNetChan:SetConnectionStartCallback( function callback )
Sets the callback function for when the connection was established.
Can be returned using CNetChan:GetConnectionStartCallback
Can be returned using CNetChan:GetConnectionStartCallback
CNetChan:SetDataRate( number rate )
CNetChan:SetFileTransmissionMode( boolean backgroundTransmission = false )
Resizes the specified buffer to the given size in bytes.
All data inside that stream is discarded, make sure everything was sent out.
CNetChan:SetMessageCallback( function callback )
Sets the callback function for any incomming messages.
Can be returned using CNetChan:GetMessageCallback
Can be returned using CNetChan:GetMessageCallback
CNetChan:SetTimeout( number seconds )
Sets the time in seconds before the channel is marked as timing out.