diff options
Diffstat (limited to 'OpenSim.Servers')
-rw-r--r-- | OpenSim.Servers/OpenGridProtocol.cs | 95 | ||||
-rw-r--r-- | OpenSim.Servers/OpenSim.Servers.csproj | 40 | ||||
-rw-r--r-- | OpenSim.Servers/OpenSim.Servers.dll.build | 1 |
3 files changed, 22 insertions, 114 deletions
diff --git a/OpenSim.Servers/OpenGridProtocol.cs b/OpenSim.Servers/OpenGridProtocol.cs deleted file mode 100644 index 66ca497..0000000 --- a/OpenSim.Servers/OpenGridProtocol.cs +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Net; | ||
4 | using System.Net.Sockets; | ||
5 | using System.Text; | ||
6 | using System.Text.RegularExpressions; | ||
7 | using System.Threading; | ||
8 | using Nwc.XmlRpc; | ||
9 | using System.Collections; | ||
10 | using OpenSim.Framework.Console; | ||
11 | |||
12 | namespace OpenSim.Servers | ||
13 | { | ||
14 | public class OpenGridProtocolServer | ||
15 | { | ||
16 | |||
17 | private Thread m_workerThread; | ||
18 | private Socket m_listenerSocket; | ||
19 | private IPEndPoint m_IPendpoint; | ||
20 | |||
21 | private int m_port; | ||
22 | private ArrayList m_clients; | ||
23 | |||
24 | private class ClientHandler | ||
25 | { | ||
26 | private Thread m_clientThread; | ||
27 | private Socket m_socketHandle; | ||
28 | |||
29 | public ClientHandler(Socket clientSocketHandle) | ||
30 | { | ||
31 | m_socketHandle = clientSocketHandle; | ||
32 | m_clientThread = new Thread(new ThreadStart(DoWork)); | ||
33 | m_clientThread.IsBackground = true; | ||
34 | m_clientThread.Start(); | ||
35 | } | ||
36 | |||
37 | private void DoWork() | ||
38 | { | ||
39 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.LOW,"OpenGridProtocol.cs: ClientHandler.DoWork() - Got new client"); | ||
40 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.NORMAL, "OpenSim 0.1, running OGS protocol 1.0"); | ||
41 | |||
42 | } | ||
43 | |||
44 | private void WriteLine(string theline) | ||
45 | { | ||
46 | theline += "\n"; | ||
47 | byte[] thelinebuffer = System.Text.Encoding.ASCII.GetBytes(theline.ToCharArray()); | ||
48 | m_socketHandle.Send(thelinebuffer, theline.Length, 0); | ||
49 | } | ||
50 | } | ||
51 | |||
52 | public OpenGridProtocolServer(int port) | ||
53 | { | ||
54 | m_port = port; | ||
55 | } | ||
56 | |||
57 | public void Start() | ||
58 | { | ||
59 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.LOW,"OpenGridProtocol.cs: Start() - Opening server socket"); | ||
60 | |||
61 | m_clients = new ArrayList(); | ||
62 | m_workerThread = new Thread(new ThreadStart(StartServerSocket)); | ||
63 | m_workerThread.IsBackground = true; | ||
64 | m_workerThread.Start(); | ||
65 | } | ||
66 | |||
67 | private void StartServerSocket() | ||
68 | { | ||
69 | try | ||
70 | { | ||
71 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.LOW,"OpenGridProtocol.cs: StartServerSocket() - Spawned main thread OK"); | ||
72 | |||
73 | |||
74 | m_IPendpoint = new IPEndPoint(IPAddress.Any, m_port); | ||
75 | m_listenerSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); | ||
76 | m_listenerSocket.Bind(m_IPendpoint); | ||
77 | m_listenerSocket.Listen(4); | ||
78 | |||
79 | Socket sockethandle; | ||
80 | while (true) | ||
81 | { | ||
82 | sockethandle = m_listenerSocket.Accept(); | ||
83 | lock (m_clients.SyncRoot) | ||
84 | { | ||
85 | m_clients.Add(new OpenGridProtocolServer.ClientHandler(sockethandle)); | ||
86 | } | ||
87 | } | ||
88 | } | ||
89 | catch (Exception e) | ||
90 | { | ||
91 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.MEDIUM,e.Message); | ||
92 | } | ||
93 | } | ||
94 | } | ||
95 | } | ||
diff --git a/OpenSim.Servers/OpenSim.Servers.csproj b/OpenSim.Servers/OpenSim.Servers.csproj index cacdb5d..182b558 100644 --- a/OpenSim.Servers/OpenSim.Servers.csproj +++ b/OpenSim.Servers/OpenSim.Servers.csproj | |||
@@ -1,4 +1,4 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
2 | <PropertyGroup> | 2 | <PropertyGroup> |
3 | <ProjectType>Local</ProjectType> | 3 | <ProjectType>Local</ProjectType> |
4 | <ProductVersion>8.0.50727</ProductVersion> | 4 | <ProductVersion>8.0.50727</ProductVersion> |
@@ -6,7 +6,8 @@ | |||
6 | <ProjectGuid>{8BB20F0A-0000-0000-0000-000000000000}</ProjectGuid> | 6 | <ProjectGuid>{8BB20F0A-0000-0000-0000-000000000000}</ProjectGuid> |
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | 7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | 8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
9 | <ApplicationIcon></ApplicationIcon> | 9 | <ApplicationIcon> |
10 | </ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | 11 | <AssemblyKeyContainerName> |
11 | </AssemblyKeyContainerName> | 12 | </AssemblyKeyContainerName> |
12 | <AssemblyName>OpenSim.Servers</AssemblyName> | 13 | <AssemblyName>OpenSim.Servers</AssemblyName> |
@@ -15,9 +16,11 @@ | |||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | 16 | <DefaultTargetSchema>IE50</DefaultTargetSchema> |
16 | <DelaySign>false</DelaySign> | 17 | <DelaySign>false</DelaySign> |
17 | <OutputType>Library</OutputType> | 18 | <OutputType>Library</OutputType> |
18 | <AppDesignerFolder></AppDesignerFolder> | 19 | <AppDesignerFolder> |
20 | </AppDesignerFolder> | ||
19 | <RootNamespace>OpenSim.Servers</RootNamespace> | 21 | <RootNamespace>OpenSim.Servers</RootNamespace> |
20 | <StartupObject></StartupObject> | 22 | <StartupObject> |
23 | </StartupObject> | ||
21 | <FileUpgradeFlags> | 24 | <FileUpgradeFlags> |
22 | </FileUpgradeFlags> | 25 | </FileUpgradeFlags> |
23 | </PropertyGroup> | 26 | </PropertyGroup> |
@@ -28,7 +31,8 @@ | |||
28 | <ConfigurationOverrideFile> | 31 | <ConfigurationOverrideFile> |
29 | </ConfigurationOverrideFile> | 32 | </ConfigurationOverrideFile> |
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | 33 | <DefineConstants>TRACE;DEBUG</DefineConstants> |
31 | <DocumentationFile></DocumentationFile> | 34 | <DocumentationFile> |
35 | </DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | 36 | <DebugSymbols>True</DebugSymbols> |
33 | <FileAlignment>4096</FileAlignment> | 37 | <FileAlignment>4096</FileAlignment> |
34 | <Optimize>False</Optimize> | 38 | <Optimize>False</Optimize> |
@@ -37,7 +41,8 @@ | |||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | 41 | <RemoveIntegerChecks>False</RemoveIntegerChecks> |
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | 42 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> |
39 | <WarningLevel>4</WarningLevel> | 43 | <WarningLevel>4</WarningLevel> |
40 | <NoWarn></NoWarn> | 44 | <NoWarn> |
45 | </NoWarn> | ||
41 | </PropertyGroup> | 46 | </PropertyGroup> |
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | 47 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | 48 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> |
@@ -46,7 +51,8 @@ | |||
46 | <ConfigurationOverrideFile> | 51 | <ConfigurationOverrideFile> |
47 | </ConfigurationOverrideFile> | 52 | </ConfigurationOverrideFile> |
48 | <DefineConstants>TRACE</DefineConstants> | 53 | <DefineConstants>TRACE</DefineConstants> |
49 | <DocumentationFile></DocumentationFile> | 54 | <DocumentationFile> |
55 | </DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | 56 | <DebugSymbols>False</DebugSymbols> |
51 | <FileAlignment>4096</FileAlignment> | 57 | <FileAlignment>4096</FileAlignment> |
52 | <Optimize>True</Optimize> | 58 | <Optimize>True</Optimize> |
@@ -55,18 +61,19 @@ | |||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | 61 | <RemoveIntegerChecks>False</RemoveIntegerChecks> |
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | 62 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> |
57 | <WarningLevel>4</WarningLevel> | 63 | <WarningLevel>4</WarningLevel> |
58 | <NoWarn></NoWarn> | 64 | <NoWarn> |
65 | </NoWarn> | ||
59 | </PropertyGroup> | 66 | </PropertyGroup> |
60 | <ItemGroup> | 67 | <ItemGroup> |
61 | <Reference Include="System" > | 68 | <Reference Include="System"> |
62 | <HintPath>System.dll</HintPath> | 69 | <HintPath>System.dll</HintPath> |
63 | <Private>False</Private> | 70 | <Private>False</Private> |
64 | </Reference> | 71 | </Reference> |
65 | <Reference Include="System.Xml" > | 72 | <Reference Include="System.Xml"> |
66 | <HintPath>System.Xml.dll</HintPath> | 73 | <HintPath>System.Xml.dll</HintPath> |
67 | <Private>False</Private> | 74 | <Private>False</Private> |
68 | </Reference> | 75 | </Reference> |
69 | <Reference Include="libsecondlife.dll" > | 76 | <Reference Include="libsecondlife.dll"> |
70 | <HintPath>..\bin\libsecondlife.dll</HintPath> | 77 | <HintPath>..\bin\libsecondlife.dll</HintPath> |
71 | <Private>False</Private> | 78 | <Private>False</Private> |
72 | </Reference> | 79 | </Reference> |
@@ -76,19 +83,19 @@ | |||
76 | <Name>OpenSim.Framework</Name> | 83 | <Name>OpenSim.Framework</Name> |
77 | <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> | 84 | <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> |
78 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 85 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
79 | <Private>False</Private> | 86 | <Private>False</Private> |
80 | </ProjectReference> | 87 | </ProjectReference> |
81 | <ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> | 88 | <ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> |
82 | <Name>OpenSim.Framework.Console</Name> | 89 | <Name>OpenSim.Framework.Console</Name> |
83 | <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> | 90 | <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> |
84 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 91 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
85 | <Private>False</Private> | 92 | <Private>False</Private> |
86 | </ProjectReference> | 93 | </ProjectReference> |
87 | <ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj"> | 94 | <ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj"> |
88 | <Name>XMLRPC</Name> | 95 | <Name>XMLRPC</Name> |
89 | <Project>{8E81D43C-0000-0000-0000-000000000000}</Project> | 96 | <Project>{8E81D43C-0000-0000-0000-000000000000}</Project> |
90 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 97 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
91 | <Private>False</Private> | 98 | <Private>False</Private> |
92 | </ProjectReference> | 99 | </ProjectReference> |
93 | </ItemGroup> | 100 | </ItemGroup> |
94 | <ItemGroup> | 101 | <ItemGroup> |
@@ -110,9 +117,6 @@ | |||
110 | <Compile Include="LoginServer.cs"> | 117 | <Compile Include="LoginServer.cs"> |
111 | <SubType>Code</SubType> | 118 | <SubType>Code</SubType> |
112 | </Compile> | 119 | </Compile> |
113 | <Compile Include="OpenGridProtocol.cs"> | ||
114 | <SubType>Code</SubType> | ||
115 | </Compile> | ||
116 | <Compile Include="XmlRpcMethod.cs"> | 120 | <Compile Include="XmlRpcMethod.cs"> |
117 | <SubType>Code</SubType> | 121 | <SubType>Code</SubType> |
118 | </Compile> | 122 | </Compile> |
@@ -124,4 +128,4 @@ | |||
124 | <PostBuildEvent> | 128 | <PostBuildEvent> |
125 | </PostBuildEvent> | 129 | </PostBuildEvent> |
126 | </PropertyGroup> | 130 | </PropertyGroup> |
127 | </Project> | 131 | </Project> \ No newline at end of file |
diff --git a/OpenSim.Servers/OpenSim.Servers.dll.build b/OpenSim.Servers/OpenSim.Servers.dll.build index 61475ec..4ad29dd 100644 --- a/OpenSim.Servers/OpenSim.Servers.dll.build +++ b/OpenSim.Servers/OpenSim.Servers.dll.build | |||
@@ -17,7 +17,6 @@ | |||
17 | <include name="LocalUserProfileManager.cs" /> | 17 | <include name="LocalUserProfileManager.cs" /> |
18 | <include name="LoginResponse.cs" /> | 18 | <include name="LoginResponse.cs" /> |
19 | <include name="LoginServer.cs" /> | 19 | <include name="LoginServer.cs" /> |
20 | <include name="OpenGridProtocol.cs" /> | ||
21 | <include name="XmlRpcMethod.cs" /> | 20 | <include name="XmlRpcMethod.cs" /> |
22 | </sources> | 21 | </sources> |
23 | <references basedir="${project::get-base-directory()}"> | 22 | <references basedir="${project::get-base-directory()}"> |