Sends data through the connection to the SRP Engine Service.
Syntax
Result = SRP_TcpClient(Object, "SEND_SES", Command)
Returns
Returns 1 if the socket succeeds in sending the whole packet or 0 if the socket lost connection or was blocked, in which case you should try again.
Parameters
| Parameter | Description |
|---|---|
| Command | The command to be sent to the remote server. |
Remarks
The SEND_SES service sends a command to the SRP Engine Service. The SRP Engine Service only accepts OENGINE commands (that very same commands valid in the Engine Monitor). Unlike the SEND service, SEND_SES takes care of the dirty work of sending the commands length, in bytes, to the server prior to sending the string itself.
Example
Equate NumTries$ to 8 SendSucceeded = 0 Handle = 0 For i = 1 to NumTries$ Until SendSucceeded If SRP_TcpClient(Handle, "CONNECT", "127.0.0.1", "7777") then SendSucceeded = SRP_TcpClient(Handle, "SEND_SES", "run MyStoredProcedure") SRP_TcpClient(Handle, "CLOSE_SES") end Next i