socketConnect
Description
Creates a TCP connection through a socket.
Input / Parameter
type
The type of connection.
String/Text
-
-
Yes
name
The name of the connection.
String/Text
default
-
No
host
The host for the connection.
String/Text
-
-
Yes
port
The port for the connection.
String/Text
-
-
Yes
authorization
The authorization for the connection.
String/Text
-
-
Yes
Output
N/A
Callback
callback
The function to be executed if the connection is created successfully.
errorCallback
The function to be executed if the connection is not created successfully.
Video
Coming Soon.
Example
The user wants to create a connection and view the socket input if it is successful.
Steps
Drag a button and label component to a page in the mobile designer. Call the function
socketConnectin the button component.

Call the function
consolein the callbacks of thesocketConnectfunction. Select the parameter typeinputfor thevalueparameter.
Call the function
setComponentValueand select the label component in thecomponentparameter. Set thevalueparameter type toinput.

Result
If the socket connection is successful, the host name will be shown in the label component.

Links
Last updated