Name: revXMLRPC_SetSocket

Type: command

Syntax: revXMLRPC_SetSocket <XMLRPCdocumentID>, <RPCsocket>

Summary:
Sets the socket of an <XML-RPC document>.

Associations: xml-rpc library

Introduced: 2.5

OS: mac, windows, linux, ios, android

Platforms: desktop, server, mobile

Security: disk, process

Example:
revXMLRPC_SetSocket tRequest,tOpenSocket

Parameters:
XMLRPCdocumentID (integer):
The number returned by the <revXMLRPC_CreateRequest> when you created the
<XML-RPC> request.

RPCsocket (string):
The number of the opened <socket> to set and use.

The result (string):
If the <revXMLRPC_SetSocket> <command> encounters an error, it
<return|returns> an error message starting with "xmlrpcerr" ..

Description:
Use the <revXMLRPC_SetSocket> <function> to set the network socket used
in the execution of an <XML-RPC> request. By default, XML-RPC uses the
<post> <command> to execute an <XML-RPC> request, but this has the
overhead of opening and closing a new socket every time. You can avoid
this by re-using an already opened <socket>.

>*Important:*  The <revXMLRPC_SetSocket> <command> is part of the
> <XML-RPC library>. To ensure that the <command> works in a
> <standalone application>, you must include this
> <LiveCode custom library|custom library> when you create your
> <standalone application|standalone>. In the Inclusions pane of the
> <Standalone Application Settings> window, make sure the "XML-RPC"
> library checkbox is checked.

References: post (command), revXMLRPC_GetSocket (function),
revXMLRPC_CreateRequest (function), return (glossary),
XML-RPC (glossary), Standalone Application Settings (glossary),
socket (glossary), standalone application (glossary), function (glossary),
command (glossary), LiveCode custom library (glossary),
XML-RPC library (library), XML-RPC document (library)

Tags: networking
