Socket.Close

From Liberty Unleashed Wiki
Revision as of 20:33, 10 November 2016 by FireBlood (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

Closes the given socket connection

Syntax

  1. bool Socket.Close( int connection )

Arguments

  • connection - The ID of the client connection you wish to close

Example

  1.  
  2. function onPlayerChat( player, text )
  3. {
  4. p_Socket.Close( 0 );
  5. }
  6.  

This would close the connection with id 0. p_Socket was created in the Connect function.

Notes

The call onPlayerChat was used in in this example. More info about this in the corresponding page.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox