From 97d5b5a1eb159e539586ca8043304f8277b8d0e3 Mon Sep 17 00:00:00 2001
From: Mike Mazur
Date: Fri, 8 Aug 2008 09:19:23 +0000
Subject: De-coupling the IClientAPI interface and ClientManager class from the
libsl/libomv Packet, as other client stacks could use other data types to
pass packets around. Starting with InPacket() here, more to come.
---
OpenSim/Framework/ClientManager.cs | 7 ++++++-
OpenSim/Framework/IClientAPI.cs | 2 +-
OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 11 +++++++----
OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | 2 +-
OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 2 +-
5 files changed, 16 insertions(+), 8 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs
index 85dafef..091f308 100644
--- a/OpenSim/Framework/ClientManager.cs
+++ b/OpenSim/Framework/ClientManager.cs
@@ -88,7 +88,12 @@ namespace OpenSim.Framework
}
}
- public void InPacket(uint circuitCode, Packet packet)
+ ///
+ /// Pass incoming packet to client.
+ ///
+ /// uint identifying the connection/client.
+ /// object containing the packet.
+ public void InPacket(uint circuitCode, object packet)
{
IClientAPI client;
bool tryGetRet = false;
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index d7f0ed4..893a783 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -703,7 +703,7 @@ namespace OpenSim.Framework
void SetDebug(int newDebug);
- void InPacket(Packet NewPack);
+ void InPacket(object NewPack);
void ProcessInPacket(Packet NewPack);
void Close(bool ShutdownCircuit);
void Kick(string message);
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index a1e270b..0acbd31 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3688,12 +3688,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_PacketHandler.PacketQueue.SetThrottleFromClient(throttles);
}
- /// method gets called when a new packet has arrived from the UDP server. This happens after it's been decoded into a libsl object
+ ///
+ /// Method gets called when a new packet has arrived from the UDP
+ /// server. This happens after it's been decoded into a libsl object.
///
- ///
- public virtual void InPacket(Packet NewPack)
+ /// object containing the packet.
+ public virtual void InPacket(object NewPack)
{
- m_PacketHandler.InPacket(NewPack);
+ // Cast NewPack to Packet.
+ m_PacketHandler.InPacket((Packet) NewPack);
}
///
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index e286d23..fff2383 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -716,7 +716,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
{
}
- public void InPacket(Packet NewPack)
+ public void InPacket(object NewPack)
{
}
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 2196dcc..e6aff15 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -708,7 +708,7 @@ namespace OpenSim.Region.Examples.SimpleModule
{
}
- public void InPacket(Packet NewPack)
+ public void InPacket(object NewPack)
{
}
--
cgit v1.1