Name: revXMLRPC_SetSocket

Type: command

Syntax: revXMLRPC_SetSocket <XML-RPC document>, <socket> 

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

Introduced: 2.5

OS: mac,windows,linux

Platforms: desktop,server,web

Security: disk,process

Example:
revXMLRPC_SetSocket theRequest,myOpenSocket

Parameters:
socket: 
documentID: The number returned by the revXMLRPC_CreateRequest when you created the XML-RPC request.

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>.

If the <revXMLRPC_SetSocket> <command> encounters an error, it <return|returns> an error message starting with "xmlrpcerr"..

>*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 <Revolution custom library|custom library> when you create your <standalone application|standalone>. In the Inclusions section on the General screen of the <Standalone Application Settings> window, make sure "XML-RPC Library" is selected in the list of script libraries.

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

Tags: networking
