Socket.Close

From Liberty Unleashed Wiki
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