ConnectServer / RpcProtheus / DisconnectServer
Contextualizes the RPC lifecycle described by the eAdvpl guide.
Overview
The historical eAdvpl guide describes ConnectServer() creating an identifier, RpcProtheus(nCon,cFunc,cParam) making the call and DisconnectServer(nCon) closing the connection. It does not establish authentication, target configuration, timeout or reliable call-return semantics; the return text repeats the connection description. This is not a current Protheus RPC recipe. The fragment registers three callbacks without invoking them to discuss ordering and cleanup ownership in a previously identified historical implementation. (Guia de referência eAdvpl, n.d., p. 34, ref. 1)
Commented example
// Historical fragment: callbacks are not executed.
bOpen := {|| ConnectServer()}
bCall := {|nCon,cFunc,cParam| RpcProtheus(nCon,cFunc,cParam)}
bClose := {|nCon| DisconnectServer(nCon)}No connection or remote invocation performed. Declare blocks in the caller; nCon/cFunc/cParam preserve the historical source notation. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Identify the deployed technology and contract before adapting. Keep passwords, private hosts and real routine names out of public examples.
- Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.