aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/RemoteServer
diff options
context:
space:
mode:
authorTedd Hansen2008-01-12 00:48:58 +0000
committerTedd Hansen2008-01-12 00:48:58 +0000
commit1e9a66cbaae97759c5c4e936664b5cc7a4feca89 (patch)
tree902166cca5b637ca85d97a6d8b8d941a4ed4a138 /OpenSim/Region/ScriptEngine/RemoteServer
parentFix some warnings under mono. (diff)
downloadopensim-SC-1e9a66cbaae97759c5c4e936664b5cc7a4feca89.zip
opensim-SC-1e9a66cbaae97759c5c4e936664b5cc7a4feca89.tar.gz
opensim-SC-1e9a66cbaae97759c5c4e936664b5cc7a4feca89.tar.bz2
opensim-SC-1e9a66cbaae97759c5c4e936664b5cc7a4feca89.tar.xz
ScriptServer communication protocol (v1), primitive RPC-like TCP client/server
Diffstat (limited to 'OpenSim/Region/ScriptEngine/RemoteServer')
-rw-r--r--OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs16
2 files changed, 11 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
index d56c1fb..1b37378 100644
--- a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
@@ -48,6 +48,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
48 { 48 {
49 myScriptEngine = _ScriptEngine; 49 myScriptEngine = _ScriptEngine;
50 50
51
51 myScriptEngine.Log.Verbose("RemoteEngine", "Hooking up to server events"); 52 myScriptEngine.Log.Verbose("RemoteEngine", "Hooking up to server events");
52 //myScriptEngine.World.EventManager.OnObjectGrab += touch_start; 53 //myScriptEngine.World.EventManager.OnObjectGrab += touch_start;
53 myScriptEngine.World.EventManager.OnRezScript += OnRezScript; 54 myScriptEngine.World.EventManager.OnRezScript += OnRezScript;
@@ -61,10 +62,11 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
61 { 62 {
62 // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID 63 // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID
63 myScriptEngine.Log.Verbose("RemoteEngine", "Creating new script (with connection)"); 64 myScriptEngine.Log.Verbose("RemoteEngine", "Creating new script (with connection)");
65
66
64 ScriptServerInterfaces.ServerRemotingObject obj = myScriptEngine.m_RemoteServer.Connect("localhost", 1234); 67 ScriptServerInterfaces.ServerRemotingObject obj = myScriptEngine.m_RemoteServer.Connect("localhost", 1234);
65
66 remoteScript.Add(localID, obj); 68 remoteScript.Add(localID, obj);
67 //remoteScript[localID].Events.OnRezScript(localID, itemID, script); 69 remoteScript[localID].Events().OnRezScript(localID, itemID, script);
68 70
69 } 71 }
70 72
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs b/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs
index 6fc6c5c..38eb9b9 100644
--- a/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs
+++ b/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs
@@ -13,19 +13,17 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
13 // Handles connections to servers 13 // Handles connections to servers
14 // Create and returns server object 14 // Create and returns server object
15 15
16 public RemoteServer()
17 {
18 TcpChannel chan = new TcpChannel();
19 ChannelServices.RegisterChannel(chan, true);
20 }
21
16 public ScriptServerInterfaces.ServerRemotingObject Connect(string hostname, int port) 22 public ScriptServerInterfaces.ServerRemotingObject Connect(string hostname, int port)
17 { 23 {
18 // Create a channel for communicating w/ the remote object 24 // Create a channel for communicating w/ the remote object
19 // Notice no port is specified on the client 25 // Notice no port is specified on the client
20 TcpChannel chan = new TcpChannel(); 26
21 try
22 {
23 ChannelServices.RegisterChannel(chan, true);
24 }
25 catch (System.Runtime.Remoting.RemotingException)
26 {
27 System.Console.WriteLine("Error: tcp already registered, RemoteServer.cs in OpenSim.Region.ScriptEngine.RemoteServer line 24");
28 }
29 try 27 try
30 { 28 {
31 29