# Appropriately ending a RPC call with Broker

**URL:** <https://techcommunity.softwareag.com/t/appropriately-ending-a-rpc-call-with-broker/98593>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [October 5, 2011, 10:07pm UTC](https://techcommunity.softwareag.com/t/appropriately-ending-a-rpc-call-with-broker/98593 "2011-10-05T22:07:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Doug\_Story](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@Doug\_Story](https://techcommunity.softwareag.com/u/Doug_Story)\
**Post date:** [October 5, 2011, 10:07pm UTC](https://techcommunity.softwareag.com/t/appropriately-ending-a-rpc-call-with-broker/98593/1 "2011-10-05T22:07:46Z")

</div>

Hello,  
I am generating a C# client using the EntireX workbench (Eclipse).  
Below is an example snippet where I am calling a simple test subprogram.

[color=blue]Broker brk = new Broker(hostmane);  
Service srv = new Service(brk);  
srv.ServerAddress = srvName;

SYSRPC rpcCall = new SYSRPC(srv);

// Setup parameters for the call  
StringBuilder p1 = new StringBuilder(“test”);  
decimal p2 = 0.0;  
int p3 = 0;  
float p4 = 0.0;

//Make RPC Call  
rpcCall.TESTS1(ref p1, ref p2, ref p3, ref p4);[/color]

This call works fine and returns the data as expected.  
What I am wondering is: what kind of clean up should I make sure to do when I have finished my RPC call? I see there is a Logoff() method availble. However I am never explictly calling the LogOn() method, so should I need to call the LogOff() method?

Thank you all very much for your help.

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [October 6, 2011, 2:56pm UTC](https://techcommunity.softwareag.com/t/appropriately-ending-a-rpc-call-with-broker/98593/2 "2011-10-06T14:56:00Z")

</div>

logon() and logoff() are important when Security is being used. An implicit logon is done on the first call if you don’t do an explicit one (the EntireX Broker can be configured to require an explicit logon).

The logoff is optional and the timeout settings will govern when EntireX cleans up the resources assigned to your user connection.

I would recommend using an explicit logoff when you are finished as a normal practice. This ensures that the Broker is able to release your resources as soon as you are done with them. Obviously there are conditions under which you wouldn’t - continuing calls (a repeated loop, to retrieve more information, for example), conversations, etc.

---

<div class="post-metadata">

**Author:** ![Doug\_Story](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@Doug\_Story](https://techcommunity.softwareag.com/u/Doug_Story)\
**Post date:** [October 6, 2011, 11:08pm UTC](https://techcommunity.softwareag.com/t/appropriately-ending-a-rpc-call-with-broker/98593/3 "2011-10-06T23:08:53Z")

</div>

Excellent, thank you for the advise.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:01pm UTC](https://techcommunity.softwareag.com/t/appropriately-ending-a-rpc-call-with-broker/98593/4 "2021-04-02T15:01:03Z")

</div>


