aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs
diff options
context:
space:
mode:
authorTedd Hansen2007-12-30 22:37:07 +0000
committerTedd Hansen2007-12-30 22:37:07 +0000
commit6055db2bc3beadcfd3e06c74b0fffb42ae4545a7 (patch)
treedebac78168e81bc1995c39ffd8134f61613652c1 /OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs
parentAdd an extra check that we don't create new inventory folders for a user that... (diff)
downloadopensim-SC_OLD-6055db2bc3beadcfd3e06c74b0fffb42ae4545a7.zip
opensim-SC_OLD-6055db2bc3beadcfd3e06c74b0fffb42ae4545a7.tar.gz
opensim-SC_OLD-6055db2bc3beadcfd3e06c74b0fffb42ae4545a7.tar.bz2
opensim-SC_OLD-6055db2bc3beadcfd3e06c74b0fffb42ae4545a7.tar.xz
server->script event path almost ready for remote scriptengine (translation table between local script ID and remote script ID missing)
Diffstat (limited to 'OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs b/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs
new file mode 100644
index 0000000..423e6be
--- /dev/null
+++ b/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs
@@ -0,0 +1,38 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using System.Runtime.Remoting;
5using System.Runtime.Remoting.Channels;
6using System.Runtime.Remoting.Channels.Tcp;
7
8namespace OpenSim.Region.ScriptEngine.RemoteServer
9{
10 class RemoteServer
11 {
12
13 public OpenSim.Grid.ScriptServer.RemotingObject Connect(string hostname, int port)
14 {
15 // Create a channel for communicating w/ the remote object
16 // Notice no port is specified on the client
17 TcpChannel chan = new TcpChannel();
18 ChannelServices.RegisterChannel(chan, true);
19
20 // Create an instance of the remote object
21 OpenSim.Grid.ScriptServer.RemotingObject obj = (OpenSim.Grid.ScriptServer.RemotingObject)Activator.GetObject(
22 typeof(OpenSim.Grid.ScriptServer.RemotingObject),
23 "tcp://" + hostname + ":" + port + "/DotNetEngine");
24
25 // Use the object
26 if (obj.Equals(null))
27 {
28 System.Console.WriteLine("Error: unable to locate server");
29 }
30 else
31 {
32 return obj;
33 }
34 return null;
35
36 }
37 }
38}