Changes to ScriptServer to (hopefully) make it compile on both .Net and Mono.

Some debug info for startup added to find bugs. ++
afrisby
Tedd Hansen 2008-01-05 15:48:02 +00:00
parent 53793db182
commit 966f639ad6
12 changed files with 233 additions and 412 deletions

View File

@ -63,7 +63,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
for (int i = 0; i < regionsToLoad.Length; i++) for (int i = 0; i < regionsToLoad.Length; i++)
{ {
MainLog.Instance.Debug("LOADREGIONS", "Creating Region: " + regionsToLoad[i].RegionName); MainLog.Instance.Debug("LOADREGIONS", "Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")");
openSim.CreateRegion(regionsToLoad[i]); openSim.CreateRegion(regionsToLoad[i]);
} }
@ -93,7 +93,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
{ {
if (regionhandle == regionsToLoad[i].RegionHandle) if (regionhandle == regionsToLoad[i].RegionHandle)
{ {
MainLog.Instance.Debug("LOADREGIONS", "Creating Region: " + regionsToLoad[i].RegionName); MainLog.Instance.Debug("LOADREGIONS", "Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")");
openSim.CreateRegion(regionsToLoad[i]); openSim.CreateRegion(regionsToLoad[i]);
} }
} }

View File

@ -147,8 +147,15 @@ namespace OpenSim.Framework
checkAndAddConfigOption(configOption); checkAndAddConfigOption(configOption);
} }
// TEMP - REMOVE
private int cE = 0;
public void performConfigurationRetrieve() public void performConfigurationRetrieve()
{ {
if (cE > 1)
MainLog.Instance.Error("READING CONFIGURATION COUT: " + cE.ToString());
configurationPlugin = LoadConfigDll(configurationPluginFilename); configurationPlugin = LoadConfigDll(configurationPluginFilename);
configurationOptions.Clear(); configurationOptions.Clear();
if (loadFunction == null) if (loadFunction == null)

View File

@ -2,26 +2,26 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.ScriptEngine.DotNetEngine; using OpenSim.Region.ScriptEngine.Common;
namespace OpenSim.Grid.ScriptServer namespace OpenSim.Grid.ScriptServer
{ {
public class RemotingObject : MarshalByRefObject public class RemotingObject : MarshalByRefObject, ScriptServerInterfaces.ServerRemotingObject
{ {
// This object will be exposed over remoting. It is a singleton, so it exists only in as one instance. // This object will be exposed over remoting. It is a singleton, so it exists only in as one instance.
// Expose ScriptEngine directly for now ... this is not very secure :) // Expose ScriptEngine directly for now ... this is not very secure :)
// NOTE! CURRENTLY JUST HARDWIRED DOTNETENGINE! // NOTE! CURRENTLY JUST HARDWIRED DOTNETENGINE!
public OpenSim.Region.ScriptEngine.DotNetEngine.ScriptEngine ScriptEngine = new OpenSim.Region.ScriptEngine.DotNetEngine.ScriptEngine(); //private OpenSim.Region.ScriptEngine.DotNetEngine.ScriptEngine SE =
// new OpenSim.Region.ScriptEngine.DotNetEngine.ScriptEngine();
//public OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.RemoteEvents Events =
// (OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.RemoteEvents)SE.m_EventManager;
//private ScriptServerInterfaces.RemoteEvents _events = new abc;
/// <summary> ScriptServerInterfaces.RemoteEvents ScriptServerInterfaces.ServerRemotingObject.Events()
/// Receives calls from remote grids.
/// </summary>
/// <returns></returns>
public OpenSim.Region.ScriptEngine.DotNetEngine.ScriptEngine GetScriptEngine()
{ {
return ScriptEngine; return null;
} }
} }
} }

View File

@ -331,8 +331,9 @@ namespace OpenSim
MainLog.Instance.Verbose("PLUGINS", "Loading {0} OpenSim application plugins", nodes.Count); MainLog.Instance.Verbose("PLUGINS", "Loading {0} OpenSim application plugins", nodes.Count);
foreach (TypeExtensionNode node in nodes) foreach (TypeExtensionNode node in nodes)
{ {
IApplicationPlugin plugin = (IApplicationPlugin) node.CreateInstance(); MainLog.Instance.Verbose("PLUGINS", "Loading OpenSim application plugin: ", node.GetType().AssemblyQualifiedName.ToString());
IApplicationPlugin plugin = (IApplicationPlugin)node.CreateInstance();
plugin.Initialise(this); plugin.Initialise(this);
m_plugins.Add(plugin); m_plugins.Add(plugin);
@ -375,7 +376,10 @@ namespace OpenSim
m_moduleLoader.PickupModules(scene, "."); m_moduleLoader.PickupModules(scene, ".");
//m_moduleLoader.PickupModules(scene, "ScriptEngines"); //m_moduleLoader.PickupModules(scene, "ScriptEngines");
//m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene);
MainLog.Instance.Verbose("MODULES", "Loading scripting engine modules");
m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene); m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene);
m_moduleLoader.InitialiseSharedModules(scene); m_moduleLoader.InitialiseSharedModules(scene);

View File

@ -121,8 +121,8 @@ namespace OpenSim.Region.Communications.OGS1
GridResp = GridReq.Send(serversInfo.GridURL, 10000); GridResp = GridReq.Send(serversInfo.GridURL, 10000);
} catch (Exception ex) } catch (Exception ex)
{ {
MainLog.Instance.Error("Unable to connect to grid (Grid server not running?): " + ex.ToString()); MainLog.Instance.Error("Unable to connect to grid. Grid server not running?");
return null; throw(ex);
} }
Hashtable GridRespData = (Hashtable)GridResp.Value; Hashtable GridRespData = (Hashtable)GridResp.Value;
Hashtable griddatahash = GridRespData; Hashtable griddatahash = GridRespData;

View File

@ -0,0 +1,52 @@
using libsecondlife;
using OpenSim.Framework;
namespace OpenSim.Region.ScriptEngine.Common
{
public class ScriptServerInterfaces
{
public interface RemoteEvents
{
void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient);
void OnRezScript(uint localID, LLUUID itemID, string script);
void OnRemoveScript(uint localID, LLUUID itemID);
void state_exit(uint localID, LLUUID itemID);
void touch(uint localID, LLUUID itemID);
void touch_end(uint localID, LLUUID itemID);
void collision_start(uint localID, LLUUID itemID);
void collision(uint localID, LLUUID itemID);
void collision_end(uint localID, LLUUID itemID);
void land_collision_start(uint localID, LLUUID itemID);
void land_collision(uint localID, LLUUID itemID);
void land_collision_end(uint localID, LLUUID itemID);
void timer(uint localID, LLUUID itemID);
void listen(uint localID, LLUUID itemID);
void on_rez(uint localID, LLUUID itemID);
void sensor(uint localID, LLUUID itemID);
void no_sensor(uint localID, LLUUID itemID);
void control(uint localID, LLUUID itemID);
void money(uint localID, LLUUID itemID);
void email(uint localID, LLUUID itemID);
void at_target(uint localID, LLUUID itemID);
void not_at_target(uint localID, LLUUID itemID);
void at_rot_target(uint localID, LLUUID itemID);
void not_at_rot_target(uint localID, LLUUID itemID);
void run_time_permissions(uint localID, LLUUID itemID);
void changed(uint localID, LLUUID itemID);
void attach(uint localID, LLUUID itemID);
void dataserver(uint localID, LLUUID itemID);
void link_message(uint localID, LLUUID itemID);
void moving_start(uint localID, LLUUID itemID);
void moving_end(uint localID, LLUUID itemID);
void object_rez(uint localID, LLUUID itemID);
void remote_data(uint localID, LLUUID itemID);
void http_response(uint localID, LLUUID itemID);
}
public interface ServerRemotingObject
{
RemoteEvents Events();
}
}
}

View File

@ -36,7 +36,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
/// Prepares events so they can be directly executed upon a script by EventQueueManager, then queues it. /// Prepares events so they can be directly executed upon a script by EventQueueManager, then queues it.
/// </summary> /// </summary>
[Serializable] [Serializable]
public class EventManager public class EventManager : OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.RemoteEvents
{ {
// //

View File

@ -29,8 +29,7 @@
using System; using System;
using libsecondlife; using libsecondlife;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Grid.ScriptServer; using OpenSim.Region.ScriptEngine.Common;
using OpenSim.Region.ScriptEngine.DotNetEngine;
namespace OpenSim.Region.ScriptEngine.RemoteServer namespace OpenSim.Region.ScriptEngine.RemoteServer
{ {
@ -41,7 +40,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
internal class EventManager internal class EventManager
{ {
System.Collections.Generic.Dictionary<uint, RemotingObject> remoteScript = new System.Collections.Generic.Dictionary<uint, OpenSim.Grid.ScriptServer.RemotingObject>(); System.Collections.Generic.Dictionary<uint, ScriptServerInterfaces.ServerRemotingObject> remoteScript = new System.Collections.Generic.Dictionary<uint, ScriptServerInterfaces.ServerRemotingObject>();
private ScriptEngine myScriptEngine; private ScriptEngine myScriptEngine;
@ -61,413 +60,183 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
public void OnRezScript(uint localID, LLUUID itemID, string script) public void OnRezScript(uint localID, LLUUID itemID, string script)
{ {
// WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID
OpenSim.Grid.ScriptServer.RemotingObject obj = myScriptEngine.m_RemoteServer.Connect("localhost", 1234); myScriptEngine.Log.Verbose("RemoteEngine", "Creating new script (with connection)");
ScriptServerInterfaces.ServerRemotingObject obj = myScriptEngine.m_RemoteServer.Connect("localhost", 1234);
remoteScript.Add(localID, obj); remoteScript.Add(localID, obj);
try //remoteScript[localID].Events.OnRezScript(localID, itemID, script);
{
remoteScript[localID].ScriptEngine.m_EventManager.OnRezScript(localID, itemID, script);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
} }
public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
{ {
try //remoteScript[localID].Events.touch_start(localID, offsetPos, remoteClient);
{
remoteScript[localID].ScriptEngine.m_EventManager.touch_start(localID, offsetPos, remoteClient);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
} }
public void OnRemoveScript(uint localID, LLUUID itemID)
{
try
{
remoteScript[localID].ScriptEngine.m_EventManager.OnRemoveScript(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void state_exit(uint localID, LLUUID itemID)
{
try
{
remoteScript[localID].ScriptEngine.m_EventManager.state_exit(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void touch(uint localID, LLUUID itemID) // PLACEHOLDERS -- CODE WILL CHANGE!
{
try
{
remoteScript[localID].ScriptEngine.m_EventManager.touch(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void touch_end(uint localID, LLUUID itemID)
{
try
{
remoteScript[localID].ScriptEngine.m_EventManager.touch_end(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void collision_start(uint localID, LLUUID itemID) //public void OnRemoveScript(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.OnRemoveScript(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.collision_start(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void collision(uint localID, LLUUID itemID) //public void state_exit(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.state_exit(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.collision(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void collision_end(uint localID, LLUUID itemID) //public void touch(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.touch(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.collision_end(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void land_collision_start(uint localID, LLUUID itemID) //public void touch_end(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.touch_end(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.land_collision_start(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void land_collision(uint localID, LLUUID itemID) //public void collision_start(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.collision_start(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.land_collision(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void land_collision_end(uint localID, LLUUID itemID) //public void collision(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.collision(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.land_collision_end(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void timer(uint localID, LLUUID itemID) //public void collision_end(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.collision_end(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.timer(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void listen(uint localID, LLUUID itemID) //public void land_collision_start(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.land_collision_start(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.listen(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void on_rez(uint localID, LLUUID itemID) //public void land_collision(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.land_collision(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.on_rez(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void sensor(uint localID, LLUUID itemID) //public void land_collision_end(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.land_collision_end(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.sensor(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void no_sensor(uint localID, LLUUID itemID) //public void timer(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.timer(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.no_sensor(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void control(uint localID, LLUUID itemID) //public void listen(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.listen(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.control(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void money(uint localID, LLUUID itemID) //public void on_rez(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.on_rez(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.money(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void email(uint localID, LLUUID itemID) //public void sensor(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.sensor(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.email(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void at_target(uint localID, LLUUID itemID) //public void no_sensor(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.no_sensor(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.at_target(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void not_at_target(uint localID, LLUUID itemID) //public void control(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.control(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.not_at_target(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void at_rot_target(uint localID, LLUUID itemID) //public void money(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.money(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.at_rot_target(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void not_at_rot_target(uint localID, LLUUID itemID) //public void email(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.email(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.not_at_rot_target(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void run_time_permissions(uint localID, LLUUID itemID) //public void at_target(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.at_target(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.run_time_permissions(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void changed(uint localID, LLUUID itemID) //public void not_at_target(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.not_at_target(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.changed(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void attach(uint localID, LLUUID itemID) //public void at_rot_target(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.at_rot_target(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.attach(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void dataserver(uint localID, LLUUID itemID) //public void not_at_rot_target(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.not_at_rot_target(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.dataserver(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void link_message(uint localID, LLUUID itemID) //public void run_time_permissions(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.run_time_permissions(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.link_message(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void moving_start(uint localID, LLUUID itemID) //public void changed(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.changed(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.moving_start(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void moving_end(uint localID, LLUUID itemID) //public void attach(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.attach(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.moving_end(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void object_rez(uint localID, LLUUID itemID) //public void dataserver(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.dataserver(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.object_rez(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void remote_data(uint localID, LLUUID itemID) //public void link_message(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.link_message(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.remote_data(localID, itemID);
}
catch (System.NullReferenceException)
{
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
}
}
public void http_response(uint localID, LLUUID itemID) //public void moving_start(uint localID, LLUUID itemID)
{ //{
try // remoteScript[localID].Events.moving_start(localID, itemID);
{ //}
remoteScript[localID].ScriptEngine.m_EventManager.http_response(localID, itemID);
} //public void moving_end(uint localID, LLUUID itemID)
catch (System.NullReferenceException) //{
{ // remoteScript[localID].Events.moving_end(localID, itemID);
OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?"); //}
}
} //public void object_rez(uint localID, LLUUID itemID)
//{
// remoteScript[localID].Events.object_rez(localID, itemID);
//}
//public void remote_data(uint localID, LLUUID itemID)
//{
// remoteScript[localID].Events.remote_data(localID, itemID);
//}
//public void http_response(uint localID, LLUUID itemID)
//{
// remoteScript[localID].Events.http_response(localID, itemID);
//}
} }
} }

View File

@ -4,6 +4,7 @@ using System.Text;
using System.Runtime.Remoting; using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp; using System.Runtime.Remoting.Channels.Tcp;
using OpenSim.Region.ScriptEngine.Common;
namespace OpenSim.Region.ScriptEngine.RemoteServer namespace OpenSim.Region.ScriptEngine.RemoteServer
{ {
@ -12,7 +13,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
// Handles connections to servers // Handles connections to servers
// Create and returns server object // Create and returns server object
public OpenSim.Grid.ScriptServer.RemotingObject Connect(string hostname, int port) public ScriptServerInterfaces.ServerRemotingObject Connect(string hostname, int port)
{ {
// Create a channel for communicating w/ the remote object // Create a channel for communicating w/ the remote object
// Notice no port is specified on the client // Notice no port is specified on the client
@ -29,8 +30,8 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
{ {
// Create an instance of the remote object // Create an instance of the remote object
OpenSim.Grid.ScriptServer.RemotingObject obj = (OpenSim.Grid.ScriptServer.RemotingObject)Activator.GetObject( ScriptServerInterfaces.ServerRemotingObject obj = (ScriptServerInterfaces.ServerRemotingObject)Activator.GetObject(
typeof(OpenSim.Grid.ScriptServer.RemotingObject), typeof(ScriptServerInterfaces.ServerRemotingObject),
"tcp://" + hostname + ":" + port + "/DotNetEngine"); "tcp://" + hostname + ":" + port + "/DotNetEngine");
// Use the object // Use the object

View File

@ -92,7 +92,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
public string Name public string Name
{ {
get { return "LSLScriptingModule"; } get { return "RemoteServerScriptingModule"; }
} }
public bool IsSharedModule public bool IsSharedModule

View File

@ -44,7 +44,7 @@ verbose = true
; ScriptEngine ; ScriptEngine
script_engine = OpenSim.Region.ScriptEngine.DotNetEngine.dll script_engine = OpenSim.Region.ScriptEngine.DotNetEngine.dll
;Experimental remote ScriptServer plugin: ;Experimental remote ScriptServer plugin:
;script_engine = OpenSim.Region.ScriptEngine.RemoteEngine.dll ;script_engine = OpenSim.Region.ScriptEngine.RemoteServer.dll
; if you would like to allow prim to be physical and move by physics with the physical checkbox in the client set this to true. ; if you would like to allow prim to be physical and move by physics with the physical checkbox in the client set this to true.

View File

@ -1140,6 +1140,8 @@
<Reference name="System" localCopy="false"/> <Reference name="System" localCopy="false"/>
<Reference name="System.Data" localCopy="false"/> <Reference name="System.Data" localCopy="false"/>
<Reference name="System.Xml" localCopy="false"/> <Reference name="System.Xml" localCopy="false"/>
<Reference name="libsecondlife.dll"/>
<Reference name="OpenSim.Framework"/>
<Files> <Files>
<Match pattern="*.cs" recurse="true"/> <Match pattern="*.cs" recurse="true"/>
</Files> </Files>
@ -1195,7 +1197,7 @@
</Configuration> </Configuration>
<ReferencePath>../../../bin/</ReferencePath> <ReferencePath>../../../bin/</ReferencePath>
<ReferencePath>../../../bin/ScriptEngines/</ReferencePath> <ReferencePath>../../../bin/ScriptEngines/</ReferencePath>
<Reference name="System" localCopy="false"/> <Reference name="System" localCopy="false"/>
<Reference name="System.Data" localCopy="false"/> <Reference name="System.Data" localCopy="false"/>
<Reference name="System.Runtime.Remoting" localCopy="false"/> <Reference name="System.Runtime.Remoting" localCopy="false"/>
@ -1206,13 +1208,6 @@
<Reference name="OpenSim.Framework.Servers"/> <Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Data"/> <Reference name="OpenSim.Framework.Data"/>
<Reference name="OpenSim.Region.Environment"/> <Reference name="OpenSim.Region.Environment"/>
<!-- Explicit path since without it, the generated .build file does not correctly reference
the DotNetEngine assembly in bin/ScriptEngines (instead looking in simply bin/)
despite the bin/ScriptEngines reference path. Hardcoding is not a permanent solution and
may cause some warnings in Visual Studio -->
<Reference name="../../../bin/ScriptEngines/OpenSim.Region.ScriptEngine.DotNetEngine"/>
<Reference name="OpenSim.Region.ScriptEngine.Common"/> <Reference name="OpenSim.Region.ScriptEngine.Common"/>
<Reference name="libsecondlife.dll"/> <Reference name="libsecondlife.dll"/>
<Reference name="Axiom.MathLib.dll" localCopy="false"/> <Reference name="Axiom.MathLib.dll" localCopy="false"/>
@ -1223,6 +1218,7 @@
</Files> </Files>
</Project> </Project>
<Project name="OpenSim.Region.ScriptEngine.RemoteServer" path="OpenSim/Region/ScriptEngine/RemoteServer" type="Library"> <Project name="OpenSim.Region.ScriptEngine.RemoteServer" path="OpenSim/Region/ScriptEngine/RemoteServer" type="Library">
<Configuration name="Debug"> <Configuration name="Debug">
<Options> <Options>
@ -1243,21 +1239,13 @@
<Reference name="System.Runtime.Remoting" localCopy="false"/> <Reference name="System.Runtime.Remoting" localCopy="false"/>
<Reference name="OpenSim.Region.Environment" /> <Reference name="OpenSim.Region.Environment" />
<Reference name="libsecondlife.dll"/> <Reference name="libsecondlife.dll"/>
<Reference name="RAIL.dll"/>
<Reference name="OpenSim.Framework"/> <Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Console"/> <Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Region.ScriptEngine.Common"/> <Reference name="OpenSim.Region.ScriptEngine.Common"/>
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/> <Reference name="OpenSim.Region.ScriptEngine.DotNetEngine"/>
<Reference name="OpenSim.Grid.ScriptServer"/>
<!-- Explicit path since without it, the generated .build file does not correctly reference
the DotNetEngine assembly in bin/ScriptEngines (instead looking in simply bin/)
despite the bin/ScriptEngines reference path. Hardcoding is not a permanent solution and
may cause some warnings in Visual Studio -->
<Reference name="../../../../bin/ScriptEngines/OpenSim.Region.ScriptEngine.DotNetEngine"/>
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
<Reference name="Nini.dll" /> <Reference name="Nini.dll" />
<!-- Reference name="OpenSim.Grid.ScriptServer"/ -->
<Files> <Files>
<Match pattern="*.cs" recurse="true"/> <Match pattern="*.cs" recurse="true"/>
</Files> </Files>