socket(SEND,...)

socket(SEND,...)

Description

Sends buffer data to socket.

Syntax
socket(SEND, send_len, export_buf[]);

Parameters

Variable

Input

Variable

Input

send_len

Number of how much data user wants to send to socket. Maximum number of bytes is 1460.

export_buf[]

User defined buffer from which data will be sent to socket.

 

Returns

Return value

Return explanation

SCRIPT_SOCKET_SUCCESS

Success

SCRIPT_SOCKET_ERROR

Error

SCRIPT_SOCKET_NO_ACCESS

No Access

SCRIPT_PARAM_INVALID

send_len too high or equals 0.

Function call example

Socket read example
new str_temp[255]; main() { socket(SEND, 100, str_temp); for(;;) { Delay(100); } }

Used in Examples

Socket example

Socket v2 example