Name: revXMLRPC_GetSocket

Type: function

Syntax: revXMLRPC_GetSocket(<XML-RPC document>)

Summary: This function returns the socket of an XML-RPC document.

Introduced: 2.5

OS: mac,windows,linux

Platforms: desktop,server,web

Security: disk,process

Example:
put revXMLRPC_GetSocket(theRequest) into theSocket

Parameters:
documentID: The number returned by the revXMLRPC_CreateRequest when you created the XML-RPC request, or the successful revXMLRPC_Execute function when you executed an XML-RPC request.

Returns: The revXMLRPC_GetProtocol <function> returns the socket connection that is established with the <host>. 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>.

Description:
Use the <revXMLRPC_GetSocket> <function> to retrieve the network socket used in the execution of an <XML-RPC request>.

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

>*Important:*  The <revXMLRPC_GetSocket> <function> is part of the <XML-RPC library>. To ensure that the <function> 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: revXMLRPC_SetSocket (command), post command (command), function (control_st), return (glossary), host (glossary), XML-RPC request (glossary), Standalone Application Settings (glossary), socket (glossary), standalone application (glossary), function (glossary), XML-RPC library (library), Revolution custom library (library)

Tags: networking
