diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/ScriptServer/RemotingServer.cs | 28 |
1 files changed, 28 insertions, 0 deletions
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 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using System.Runtime.Remoting; | ||
5 | using System.Runtime.Remoting.Channels; | ||
6 | using System.Runtime.Remoting.Channels.Tcp; | ||
7 | |||
8 | |||
9 | namespace 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 | } | ||