diff options
Diffstat (limited to 'src/RemoteServers')
-rw-r--r-- | src/RemoteServers/RemoteGridServers/AssemblyInfo.cs | 2 | ||||
-rw-r--r-- | src/RemoteServers/RemoteGridServers/RemoteGrid.cs | 35 |
2 files changed, 30 insertions, 7 deletions
diff --git a/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs b/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs index b662c4e..7d3f314 100644 --- a/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs +++ b/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs | |||
@@ -14,7 +14,7 @@ using System.Runtime.InteropServices; | |||
14 | 14 | ||
15 | [assembly: ComVisibleAttribute(false)] | 15 | [assembly: ComVisibleAttribute(false)] |
16 | [assembly: CLSCompliantAttribute(false)] | 16 | [assembly: CLSCompliantAttribute(false)] |
17 | [assembly: AssemblyVersionAttribute("0.1.*.236")] | 17 | [assembly: AssemblyVersionAttribute("0.1.0.240")] |
18 | [assembly: AssemblyTitleAttribute("opensim-remoteservers")] | 18 | [assembly: AssemblyTitleAttribute("opensim-remoteservers")] |
19 | [assembly: AssemblyDescriptionAttribute("Connects to remote OGS installation")] | 19 | [assembly: AssemblyDescriptionAttribute("Connects to remote OGS installation")] |
20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] | 20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] |
diff --git a/src/RemoteServers/RemoteGridServers/RemoteGrid.cs b/src/RemoteServers/RemoteGridServers/RemoteGrid.cs index 4f5d3a9..adb3d0f 100644 --- a/src/RemoteServers/RemoteGridServers/RemoteGrid.cs +++ b/src/RemoteServers/RemoteGridServers/RemoteGrid.cs | |||
@@ -25,11 +25,13 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | using System; | 27 | using System; |
28 | using System.Collections; | ||
28 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
29 | using System.Threading; | 30 | using System.Threading; |
30 | using System.Net; | 31 | using System.Net; |
31 | using System.Net.Sockets; | 32 | using System.Net.Sockets; |
32 | using System.IO; | 33 | using System.IO; |
34 | using System.Xml; | ||
33 | using libsecondlife; | 35 | using libsecondlife; |
34 | using OpenSim.GridServers; | 36 | using OpenSim.GridServers; |
35 | 37 | ||
@@ -116,7 +118,7 @@ namespace RemoteGridServers | |||
116 | 118 | ||
117 | public override bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode) | 119 | public override bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode) |
118 | { | 120 | { |
119 | WebRequest DeleteSession = WebRequest.Create(GridServerUrl + "/usersessions/" + sessionID.ToString()); | 121 | WebRequest DeleteSession = WebRequest.Create(UserServerUrl + "/usersessions/" + sessionID.ToString()); |
120 | DeleteSession.Method="DELETE"; | 122 | DeleteSession.Method="DELETE"; |
121 | DeleteSession.ContentType="text/plaintext"; | 123 | DeleteSession.ContentType="text/plaintext"; |
122 | DeleteSession.ContentLength=0; | 124 | DeleteSession.ContentLength=0; |
@@ -137,16 +139,37 @@ namespace RemoteGridServers | |||
137 | return(uuidBlock); | 139 | return(uuidBlock); |
138 | } | 140 | } |
139 | 141 | ||
140 | public override neighbourinfo[] RequestNeighbours() | 142 | public override neighbourinfo[] RequestNeighbours(ulong regionhandle) |
141 | { | 143 | { |
142 | neighbourinfo[] neighbours= new neighbourinfo[8]; | 144 | ArrayList neighbourlist = new ArrayList(); |
143 | return neighbours; | 145 | |
146 | WebRequest FindNeighbours = WebRequest.Create(GridServerUrl + "/regions/" + regionhandle.ToString() + "/neighbours"); | ||
147 | FindNeighbours.ContentType="text/plaintext"; | ||
148 | FindNeighbours.ContentLength=0; | ||
149 | |||
150 | StreamWriter stOut = new StreamWriter (FindNeighbours.GetRequestStream(), System.Text.Encoding.ASCII); | ||
151 | stOut.Write(""); | ||
152 | stOut.Close(); | ||
153 | |||
154 | |||
155 | XmlDocument GridRespXml = new XmlDocument(); | ||
156 | GridRespXml.Load(FindNeighbours.GetResponse().GetResponseStream()); | ||
157 | |||
158 | |||
159 | XmlNode NeighboursRoot = GridRespXml.FirstChild; | ||
160 | if(NeighboursRoot.Name != "neighbours") { | ||
161 | return new neighbourinfo[0]; | ||
162 | } | ||
163 | |||
164 | FindNeighbours.GetResponse().GetResponseStream().Close(); | ||
165 | |||
166 | return new neighbourinfo[0]; | ||
144 | } | 167 | } |
145 | 168 | ||
146 | public override void SetServerInfo(string UserServerUrl, string UserSendKey, string UserRecvKey, string GridServerKey, string GridSendKey, string GridRecvKey) | 169 | public override void SetServerInfo(string UserServerUrl, string UserSendKey, string UserRecvKey, string GridServerUrl, string GridSendKey, string GridRecvKey) |
147 | { | 170 | { |
148 | this.UserServerUrl = UserServerUrl; | 171 | this.UserServerUrl = UserServerUrl; |
149 | this.UserSendKey = UserSendKey; | 172 | this.UserSendKey = UserSendKey; |
150 | this.UserRecvKey = UserRecvKey; | 173 | this.UserRecvKey = UserRecvKey; |
151 | this.GridServerUrl = GridServerUrl; | 174 | this.GridServerUrl = GridServerUrl; |
152 | this.GridSendKey = GridSendKey; | 175 | this.GridSendKey = GridSendKey; |