Establishes a connection to a remote server.
App.RPCConnect(Name, ConnectString)
Newlook Smartclient
Newlook Server
The RPCConnect method establishes a physical connection to the remote server. After this action successfully completes, the connection is live and you can call remote commands or procedure calls against it and process the results.
When you have concluded your operations over an open Connection, use the Disconnect method on the connection object to terminate the connection and free any associated system resources.
Name (string, required)
A name that you assign to the connection object that represents the connection to the RPC server. The connection will be referred to by this name in all subsequent RPC actions. For example, your Connection name might be "RPCConnection".
ConnectString (expression, Required)
A string specifying the server connection details. This parameter consists of a semi-colon separated name/value pair that can be set to one of two things:
Each name/pair value is formatted as so: 'name=value'. Eg.'Address=192.168.1.1;Port=4245'.
The RPCConnect Action in the macro editor contains a display link properties editor which can assist you in creating the Connection string for this argument.
This method returns an object with a Name property set to the string specified in the Name argument.
The following example connects to the remote server and issues a command to send a message to a specified user. VB SCRIPTDim varNetworkAddress Dim sConnectString Dim sMessage Dim sUser varNetworkAddress = App.GetValue ("NetWorkAddress") sConnectString = "Network Address=" & varNetworkAddress & ";Network Port=8475;Use Encryption for Data=False;Host CCSID=37;NLV=2924;User ID=;Password=" App.RpcConnect "SampleConnect", sConnectString sMessage = App.GetValue ("Msg.Text") sUser = App.GetValue ("Usr.Text") SampleConnect.Command "SNDMSG MSG('" & sMessage & "') TOUSR(" & sUser & ")" SampleConnect.Disconnect
JSCRIPTvarNetworkAddress = App.GetValue ("NetWorkAddress"); sConnectString = ("Network Address=" + varNetworkAddress + ";Network Port=8475;Use Encryption for Data=False;Host CCSID=37;NLV=2924;User ID=;Password="); App.RpcConnect ("SampleConnect", sConnectString); sMessage = App.GetValue ("Msg.Text"); sUser = App.GetValue ("Usr.Text"); SampleConnect.Command ("SNDMSG MSG('" + sMessage + "') TOUSR(" + sUser + ")"); SampleConnect.Disconnect;
|
Disconnect Method | Command Method
© 2004-2021 looksoftware. All rights reserved.