Game Development Reference
In-Depth Information
_channel = new TcpChannel((int)PortField.Value);
_remotedLogic = new AlertObjectTool.AlertObjectToolLogic();
_remotedLogicRef = RemotingServices.Marshal(_remotedLogic,
ActionButton.Text = “Start Listening”;
_remotedLogicRef = null;
_remotedLogic = null;
Alert Object Remoting Example
With the specific tool logic published on a remoting channel, we can now request
a reference to the proxy object and begin invoking calls.
Here is the code for a remoting entry point that invokes the specific tool logic
using a proxy object:
// A reference to the tool logic proxy
private IAlertObjectToolLogic _logicProxy = null;
private void ActionButtonClick(object sender, System.EventArgs e)
if (ActionButton.Text.Equals(“Connect to Proxy”))
ActionButton.Text = “Release Proxy”;
_logicProxy =
“tcp://localhost:” + ((int)PortField.Value).ToString() + “/AlertObjectToolLogic”);
TestFirstButton.Enabled = true;
TestSecondButton.Enabled = true;
TestThirdButton.Enabled = true;
Search Nedrilad ::

Custom Search