Major change in Simian to abstract all UDP handling away from Agent into an IUDPProvider. UDPServer is now thinly wrapped with a UDPManager extension to provide the main packet handling facilities of Simian

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2180 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2008-08-28 22:11:47 +00:00
parent 274ca8a290
commit fe869df89f
17 changed files with 761 additions and 645 deletions

View File

@@ -41,9 +41,9 @@ namespace Simian.Extensions
public void Start()
{
server.UDPServer.RegisterPacketCallback(PacketType.AgentUpdate, new UDPServer.PacketCallback(AgentUpdateHandler));
server.UDPServer.RegisterPacketCallback(PacketType.AgentHeightWidth, new UDPServer.PacketCallback(AgentHeightWidthHandler));
server.UDPServer.RegisterPacketCallback(PacketType.SetAlwaysRun, new UDPServer.PacketCallback(SetAlwaysRunHandler));
server.UDP.RegisterPacketCallback(PacketType.AgentUpdate, new PacketCallback(AgentUpdateHandler));
server.UDP.RegisterPacketCallback(PacketType.AgentHeightWidth, new PacketCallback(AgentHeightWidthHandler));
server.UDP.RegisterPacketCallback(PacketType.SetAlwaysRun, new PacketCallback(SetAlwaysRunHandler));
updateTimer = new Timer(new TimerCallback(UpdateTimer_Elapsed));
LastTick = Environment.TickCount;
@@ -324,11 +324,7 @@ namespace Simian.Extensions
NameValue.NameValuesToString(agent.Avatar.NameValues), server.RegionHandle,
agent.State, agent.Flags);
lock (server.Agents)
{
foreach (Agent recipient in server.Agents.Values)
recipient.SendPacket(fullUpdate);
}
server.UDP.BroadcastPacket(fullUpdate, PacketCategory.State);
}
void SetAlwaysRunHandler(Packet packet, Agent agent)