Usina BRAdvPL Guide
Sign in
← All topics
PRACTICAL GUIDEUnder review

ConnectServer / RpcProtheus / DisconnectServer

Contextualizes the RPC lifecycle described by the eAdvpl guide.

ConnectServer / RpcProtheus / DisconnectServerAdvPL
01 · OVERVIEW

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)

03 · PRACTICAL EXAMPLE

Commented example

// Historical fragment: callbacks are not executed.
bOpen := {|| ConnectServer()}
bCall := {|nCon,cFunc,cParam| RpcProtheus(nCon,cFunc,cParam)}
bClose := {|nCon| DisconnectServer(nCon)}
Expected result

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.

BEST PRACTICES
  • 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.

Related content

REFERENCES
  1. Guia de referência eAdvpl. Seção 9, p. 34. Fonte histórica; autoria e compatibilidade atual não confirmadas. Accessed on 2026-10-26.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha