blob: eb297404444949765dd586d27056e8fe8d26ea2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using OpenSim.Region.ScriptEngine.Common;
namespace OpenSim.Grid.ScriptServer
{
class RemotingServer
{
TcpChannel channel;
public RemotingServer(int port, string instanceName)
{
// Create an instance of a channel
channel = new TcpChannel(port);
ChannelServices.RegisterChannel(channel, true);
// Register as an available service with the name HelloWorld
RemotingConfiguration.RegisterWellKnownServiceType(
typeof(RemotingObject),
instanceName,
WellKnownObjectMode.Singleton);
}
}
}
|