Yet more cleanup/refactoring
parent
3f39648605
commit
bd6e69b97c
|
@ -20,6 +20,13 @@ namespace OpenSim
|
|||
{
|
||||
public partial class SimClient
|
||||
{
|
||||
protected virtual void RegisterLocalPacketHandlers()
|
||||
{
|
||||
this.AddLocalPacketHandler(PacketType.LogoutRequest, this.Logout);
|
||||
this.AddLocalPacketHandler(PacketType.AgentCachedTexture, this.AgentTextureCached);
|
||||
this.AddLocalPacketHandler(PacketType.MultipleObjectUpdate, this.MultipleObjUpdate);
|
||||
}
|
||||
|
||||
protected virtual bool Logout(SimClient simClient, Packet packet)
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:ProcessInPacket() - Got a logout request");
|
||||
|
|
|
@ -135,13 +135,7 @@ namespace OpenSim
|
|||
ClientThread.Start();
|
||||
}
|
||||
|
||||
protected virtual void RegisterLocalPacketHandlers()
|
||||
{
|
||||
this.AddLocalPacketHandler(PacketType.LogoutRequest, this.Logout);
|
||||
this.AddLocalPacketHandler(PacketType.AgentCachedTexture, this.AgentTextureCached);
|
||||
this.AddLocalPacketHandler(PacketType.MultipleObjectUpdate, this.MultipleObjUpdate);
|
||||
}
|
||||
|
||||
# region Client Methods
|
||||
public void UpgradeClient()
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - upgrading child to full agent");
|
||||
|
@ -188,7 +182,9 @@ namespace OpenSim
|
|||
m_networkServer.RemoveClientCircuit(this.CircuitCode);
|
||||
this.ClientThread.Abort();
|
||||
}
|
||||
#endregion
|
||||
|
||||
# region Packet Handling
|
||||
public static bool AddPacketHandler(PacketType packetType, PacketMethod handler)
|
||||
{
|
||||
bool result = false;
|
||||
|
@ -242,6 +238,10 @@ namespace OpenSim
|
|||
return result;
|
||||
}
|
||||
|
||||
# endregion
|
||||
|
||||
# region Low Level Packet Methods
|
||||
|
||||
private void ack_pack(Packet Pack)
|
||||
{
|
||||
if (Pack.Header.Reliable)
|
||||
|
@ -327,6 +327,10 @@ namespace OpenSim
|
|||
ResendUnacked();
|
||||
}
|
||||
|
||||
# endregion
|
||||
|
||||
#region Packet Queue Processing
|
||||
|
||||
protected virtual void ProcessOutPacket(Packet Pack)
|
||||
{
|
||||
// Keep track of when this packet was sent out
|
||||
|
@ -495,6 +499,10 @@ namespace OpenSim
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
# region Setup
|
||||
|
||||
protected virtual void InitNewClient()
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world");
|
||||
|
@ -539,6 +547,7 @@ namespace OpenSim
|
|||
ClientLoop();
|
||||
}
|
||||
}
|
||||
# endregion
|
||||
|
||||
#region Inventory Creation
|
||||
private void SetupInventory(AuthenticateResponse sessionInfo)
|
||||
|
@ -630,6 +639,8 @@ namespace OpenSim
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Nested Classes
|
||||
|
||||
public class QueItem
|
||||
{
|
||||
public QueItem()
|
||||
|
@ -639,5 +650,6 @@ namespace OpenSim
|
|||
public Packet Packet;
|
||||
public bool Incoming;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,6 +81,8 @@ namespace OpenSim
|
|||
this.user_accounts = accounts;
|
||||
this.m_console = console;
|
||||
PacketServer packetServer = new PacketServer(this);
|
||||
|
||||
//set up delegate for authenticate sessions
|
||||
this.AuthenticateHandler = new AuthenticateSessionHandler(this.m_gridServers.GridServer.AuthenticateSession);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
|
@ -6,7 +6,8 @@
|
|||
<ProjectGuid>{E141F4EE-0000-0000-0000-000000000000}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon></ApplicationIcon>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>ServiceManager</AssemblyName>
|
||||
|
@ -15,9 +16,11 @@
|
|||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder></AppDesignerFolder>
|
||||
<AppDesignerFolder>
|
||||
</AppDesignerFolder>
|
||||
<RootNamespace>ServiceManager</RootNamespace>
|
||||
<StartupObject></StartupObject>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
</PropertyGroup>
|
||||
|
@ -28,7 +31,8 @@
|
|||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DocumentationFile></DocumentationFile>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>False</Optimize>
|
||||
|
@ -37,7 +41,8 @@
|
|||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn></NoWarn>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
|
@ -46,7 +51,8 @@
|
|||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile></DocumentationFile>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>True</Optimize>
|
||||
|
@ -55,7 +61,8 @@
|
|||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn></NoWarn>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
|
@ -75,7 +82,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ServiceManager.cs">
|
||||
<SubType>Code</SubType>
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
|
||||
|
|
Loading…
Reference in New Issue