aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/ScriptServer
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/Grid/ScriptServer
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 '')
-rw-r--r--OpenSim/Grid/ScriptServer/RemotingObject.cs24
-rw-r--r--OpenSim/Grid/ScriptServer/RemotingServer.cs28
2 files changed, 52 insertions, 0 deletions
diff --git a/OpenSim/Grid/ScriptServer/RemotingObject.cs b/OpenSim/Grid/ScriptServer/RemotingObject.cs
new file mode 100644
index 0000000..f095ca4
--- /dev/null
+++ b/OpenSim/Grid/ScriptServer/RemotingObject.cs
@@ -0,0 +1,24 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Region.Environment.Interfaces;
5
6namespace OpenSim.Grid.ScriptServer
7{
8 public class RemotingObject : MarshalByRefObject
9 {
10 // This object will be exposed over remoting. It is a singleton, so it exists only in as one instance.
11
12 // Expose ScriptEngine
13 public OpenSim.Region.ScriptEngine.DotNetEngine.ScriptEngine ScriptEngine = new OpenSim.Region.ScriptEngine.DotNetEngine.ScriptEngine();
14
15 /// <summary>
16 /// Receives calls from remote grids.
17 /// </summary>
18 /// <returns></returns>
19 public OpenSim.Region.ScriptEngine.DotNetEngine.ScriptEngine GetScriptEngine()
20 {
21 return ScriptEngine;
22 }
23 }
24}
diff --git a/OpenSim/Grid/ScriptServer/RemotingServer.cs b/OpenSim/Grid/ScriptServer/RemotingServer.cs
new file mode 100644
index 0000000..3ec3e64
--- /dev/null
+++ b/OpenSim/Grid/ScriptServer/RemotingServer.cs
@@ -0,0 +1,28 @@
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
8
9namespace OpenSim.Grid.ScriptServer
10{
11 class RemotingServer
12 {
13
14 public void CreateServer(int port, string instanceName)
15 {
16 // Create an instance of a channel
17 TcpChannel channel = new TcpChannel(port);
18 ChannelServices.RegisterChannel(channel, true);
19
20 // Register as an available service with the name HelloWorld
21 RemotingConfiguration.RegisterWellKnownServiceType(
22 typeof(RemotingObject),
23 instanceName,
24 WellKnownObjectMode.Singleton);
25
26 }
27 }
28}