Scripting/Squirrel/Functions/NewSocket: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "This function will create a new Socket instance and return it's pointer. == Syntax == <pre>NewSocket( dataReceivedFunc )</pre> == Arguments == * ''string'' '''dataReceived...")
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:


* ''string'' '''dataReceivedFunc''' - The name of a function to call when data has been received.
* ''string'' '''dataReceivedFunc''' - The name of a function to call when data has been received.
== Notes ==
The dataReceivedFunc is like this:
<pre>function dataReceived( data )</pre>


== Example ==
== Example ==
Line 15: Line 19:


{{Scripting/Squirrel/Functions/Sockets}}
{{Scripting/Squirrel/Functions/Sockets}}
[[Category:Scripting/Squirrel/Functions/Sockets]]

Latest revision as of 21:55, 30 January 2017

This function will create a new Socket instance and return it's pointer.

Syntax

NewSocket( dataReceivedFunc )

Arguments

  • string dataReceivedFunc - The name of a function to call when data has been received.

Notes

The dataReceivedFunc is like this:

function dataReceived( data )

Example

Please refer to the Socket Example for a advanced usage of all socket functions.

Related Functions