Annotation of /trunk/ModularRex/RexNetwork/RexPacketServer.cs
Parent Directory
|
Revision Log
Revision 5 - (view) (download)
| 1 : | afrisby | 2 | using System.Net; |
| 2 : | using OpenMetaverse.Packets; | ||
| 3 : | using OpenSim.Framework; | ||
| 4 : | using OpenSim.Framework.Communications.Cache; | ||
| 5 : | afrisby | 5 | using OpenSim.Region.ClientStack; |
| 6 : | afrisby | 2 | using OpenSim.Region.ClientStack.LindenUDP; |
| 7 : | |||
| 8 : | namespace ModularRex.RexNetwork | ||
| 9 : | { | ||
| 10 : | public class RexPacketServer : LLPacketServer | ||
| 11 : | { | ||
| 12 : | afrisby | 5 | public RexPacketServer(ILLClientStackNetworkHandler networkHandler, ClientStackUserSettings userSettings) |
| 13 : | : base(networkHandler, userSettings) | ||
| 14 : | afrisby | 2 | { |
| 15 : | } | ||
| 16 : | |||
| 17 : | protected override IClientAPI CreateNewCircuit(EndPoint remoteEP, | ||
| 18 : | UseCircuitCodePacket initialcirpack, | ||
| 19 : | ClientManager clientManager, IScene scene, | ||
| 20 : | AssetCache assetCache, | ||
| 21 : | LLPacketServer packServer, AgentCircuitManager authenSessions, | ||
| 22 : | OpenMetaverse.UUID agentId, OpenMetaverse.UUID sessionId, | ||
| 23 : | uint circuitCode, EndPoint proxyEP) | ||
| 24 : | { | ||
| 25 : | return | ||
| 26 : | new RexClientView(remoteEP, scene, assetCache, packServer, | ||
| 27 : | authenSessions, agentId, sessionId, | ||
| 28 : | afrisby | 5 | circuitCode, proxyEP, new ClientStackUserSettings()); |
| 29 : | afrisby | 2 | } |
| 30 : | |||
| 31 : | public override bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, AgentCircuitManager circuitManager, EndPoint proxyEP) | ||
| 32 : | { | ||
| 33 : | IClientAPI newuser; | ||
| 34 : | |||
| 35 : | if (m_scene.ClientManager.TryGetClient(useCircuit.CircuitCode.Code, out newuser)) | ||
| 36 : | { | ||
| 37 : | return false; | ||
| 38 : | } | ||
| 39 : | |||
| 40 : | RexClientView rexuser; | ||
| 41 : | |||
| 42 : | rexuser = | ||
| 43 : | (RexClientView) CreateNewCircuit(epSender, useCircuit, m_scene.ClientManager, m_scene, assetCache, this, | ||
| 44 : | circuitManager, useCircuit.CircuitCode.ID, | ||
| 45 : | useCircuit.CircuitCode.SessionID, useCircuit.CircuitCode.Code, proxyEP); | ||
| 46 : | |||
| 47 : | m_scene.ClientManager.Add(useCircuit.CircuitCode.Code, rexuser); | ||
| 48 : | |||
| 49 : | rexuser.OnViewerEffect += m_scene.ClientManager.ViewerEffectHandler; | ||
| 50 : | rexuser.OnLogout += LogoutHandler; | ||
| 51 : | rexuser.OnConnectionClosed += CloseClient; | ||
| 52 : | |||
| 53 : | return true; | ||
| 54 : | } | ||
| 55 : | } | ||
| 56 : | } |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

