Ejemplo n.º 1
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="client">Reference to the GridClient object</param>
        public NetworkManager(LoggerInstance log)
        {
            Log = log;
            PacketEvents = new PacketEventDictionary(Log);
            CapsEvents = new CapsEventDictionary(Log);

            // Register internal CAPS callbacks
            RegisterEventCallback("EnableSimulator", new Caps.EventQueueCallback(EnableSimulatorHandler));

            // Register the internal callbacks
            RegisterCallback(PacketType.RegionHandshake, new PacketCallback(RegionHandshakeHandler));
            RegisterCallback(PacketType.StartPingCheck, new PacketCallback(StartPingCheckHandler));
            
            RegisterCallback(PacketType.DisableSimulator, new PacketCallback(DisableSimulatorHandler));
            RegisterCallback(PacketType.KickUser, new PacketCallback(KickUserHandler));
            RegisterCallback(PacketType.LogoutReply, new PacketCallback(LogoutReplyHandler));
            RegisterCallback(PacketType.CompletePingCheck, new PacketCallback(PongHandler));
			RegisterCallback(PacketType.SimStats, new PacketCallback(SimStatsHandler));

            // GLOBAL SETTING: Don't force Expect-100: Continue headers on HTTP POST calls
            ServicePointManager.Expect100Continue = false;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="client">A reference to the GridClient object</param>
        public AssetManager(LoggerInstance log, NetworkManager network)
        {
            Log = log;
            Network = network;
            Cache = new TextureCache(log, network, this);
            Texture = new TexturePipeline(log, network, this);

            // Transfer packets for downloading large assets
            Network.RegisterCallback(PacketType.TransferInfo, new NetworkManager.PacketCallback(TransferInfoHandler));
            Network.RegisterCallback(PacketType.TransferPacket, new NetworkManager.PacketCallback(TransferPacketHandler));

            // Xfer packets for uploading large assets
            Network.RegisterCallback(PacketType.RequestXfer, new NetworkManager.PacketCallback(RequestXferHandler));
            Network.RegisterCallback(PacketType.ConfirmXferPacket, new NetworkManager.PacketCallback(ConfirmXferPacketHandler));
            Network.RegisterCallback(PacketType.AssetUploadComplete, new NetworkManager.PacketCallback(AssetUploadCompleteHandler));

            // Xfer packet for downloading misc assets
            Network.RegisterCallback(PacketType.SendXferPacket, new NetworkManager.PacketCallback(SendXferPacketHandler));

            // Simulator is responding to a request to download a file
            Network.RegisterCallback(PacketType.InitiateDownload, new NetworkManager.PacketCallback(InitiateDownloadPacketHandler));

        }
Ejemplo n.º 3
0
 /// <summary>
 /// Instantiates a new ObjectManager class
 /// </summary>
 /// <param name="client">A reference to the client</param>
 internal ObjectManager(LoggerInstance log, NetworkManager network, AgentManager self)
     : this(log, network, self, true) {}
Ejemplo n.º 4
0
 /// <summary>
 /// Instantiates a new ObjectManager class
 /// </summary>
 /// <param name="client">A reference to the client</param>
 /// <param name="registerCallbacks">If false, the ObjectManager won't
 /// register any packet callbacks and won't decode incoming object
 /// packets</param>
 protected ObjectManager(LoggerInstance log, NetworkManager network, AgentManager self, bool registerCallbacks)
 {
     Network = network;
     Self = self;
     Log = log;
     if (registerCallbacks)
     {
         RegisterCallbacks();
     }
 }
Ejemplo n.º 5
0
        //public bool SendPings;
        //public int NetworkTickInterval;
        //public int PingInterval;
        //public bool SendAgentUpdates;
        //public int SimulatorTimeout;
        //public bool EnableCaps;
        #endregion

        /// <summary>
        /// 
        /// </summary>
        /// <param name="client">Reference to the GridClient object</param>
        /// <param name="address">IPEndPoint of the simulator</param>
        /// <param name="handle">handle of the simulator</param>
        public Simulator(LoggerInstance log, NetworkManager network, IPEndPoint address, ulong handle)
            : base(address)
        {
            //Client = client;
            Log = log;
            Handle = handle;
            Network = network;
            PacketArchive = new IncomingPacketIDCollection(Settings.PACKET_ARCHIVE_SIZE);
            InBytes = new Queue<long>(Network.StatsQueueSize);
            OutBytes = new Queue<long>(Network.StatsQueueSize);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Constructor, setup callbacks for packets related to our avatar
        /// </summary>
        /// <param name="client">A reference to the <seealso cref="T:OpenMetaverse.GridClient"/> Class</param>
        public AgentManager(LoggerInstance log, NetworkManager network, GridManager grid)
        {
            Log = log;
            Network = network;
            Grid = grid;
            Movement = new AgentMovement(Log, this, network);
            NetworkManager.PacketCallback callback;

            Network.OnDisconnected += new NetworkManager.DisconnectedCallback(Network_OnDisconnected);
            Network.OnCurrentSimChanged += new NetworkManager.CurrentSimChangedCallback(Network_OnCurrentSimChanged);
            // Teleport callbacks
            callback = new NetworkManager.PacketCallback(TeleportHandler);
            Network.RegisterCallback(PacketType.TeleportStart, callback);
            Network.RegisterCallback(PacketType.TeleportProgress, callback);
            Network.RegisterCallback(PacketType.TeleportFailed, callback);
            Network.RegisterCallback(PacketType.TeleportCancel, callback);
            Network.RegisterCallback(PacketType.TeleportLocal, callback);
            // these come in via the EventQueue
            Network.RegisterEventCallback("TeleportFailed", new Caps.EventQueueCallback(TeleportFailedEventHandler));
            Network.RegisterEventCallback("TeleportFinish", new Caps.EventQueueCallback(TeleportFinishEventHandler));

            // Upload cost callback:
            Network.RegisterCallback(Packets.PacketType.EconomyData, new NetworkManager.PacketCallback(EconomyDataHandler));
            // Instant message callback
            Network.RegisterCallback(PacketType.ImprovedInstantMessage, new NetworkManager.PacketCallback(InstantMessageHandler));
            // Chat callback
            Network.RegisterCallback(PacketType.ChatFromSimulator, new NetworkManager.PacketCallback(ChatHandler));
            // Script dialog callback
            Network.RegisterCallback(PacketType.ScriptDialog, new NetworkManager.PacketCallback(ScriptDialogHandler));
            // Script question callback
            Network.RegisterCallback(PacketType.ScriptQuestion, new NetworkManager.PacketCallback(ScriptQuestionHandler));
            // Script URL callback
            Network.RegisterCallback(PacketType.LoadURL, new NetworkManager.PacketCallback(LoadURLHandler));
            // Movement complete callback
            Network.RegisterCallback(PacketType.AgentMovementComplete, new NetworkManager.PacketCallback(MovementCompleteHandler));
            // Health callback
            Network.RegisterCallback(PacketType.HealthMessage, new NetworkManager.PacketCallback(HealthHandler));
            // Money callback
            Network.RegisterCallback(PacketType.MoneyBalanceReply, new NetworkManager.PacketCallback(BalanceHandler));
            //Agent update callback
            Network.RegisterCallback(PacketType.AgentDataUpdate, new NetworkManager.PacketCallback(AgentDataUpdateHandler));
            // Animation callback
            Network.RegisterCallback(PacketType.AvatarAnimation, new NetworkManager.PacketCallback(AvatarAnimationHandler));
            // Object colliding into our agent callback
            Network.RegisterCallback(PacketType.MeanCollisionAlert, new NetworkManager.PacketCallback(MeanCollisionAlertHandler));
            // Region Crossing
            Network.RegisterCallback(PacketType.CrossedRegion, new NetworkManager.PacketCallback(CrossedRegionHandler));
            Network.RegisterEventCallback("CrossedRegion", new Caps.EventQueueCallback(CrossedRegionEventHandler));
            // CAPS callbacks
            Network.RegisterEventCallback("EstablishAgentCommunication", new Caps.EventQueueCallback(EstablishAgentCommunicationEventHandler));
            // Incoming Group Chat
            Network.RegisterEventCallback("ChatterBoxInvitation", new Caps.EventQueueCallback(ChatterBoxInvitationEventHandler));
            // Outgoing Group Chat Reply
            Network.RegisterEventCallback("ChatterBoxSessionEventReply", new Caps.EventQueueCallback(ChatterBoxSessionEventReplyEventHandler));
            Network.RegisterEventCallback("ChatterBoxSessionStartReply", new Caps.EventQueueCallback(ChatterBoxSessionStartReplyEventHandler));
            Network.RegisterEventCallback("ChatterBoxSessionAgentListUpdates", new Caps.EventQueueCallback(ChatterBoxSessionAgentListUpdatesEventHandler));
            // Login
            Network.RegisterLoginResponseCallback(new NetworkManager.LoginResponseCallback(Network_OnLoginResponse));
            // Alert Messages
            Network.RegisterCallback(PacketType.AlertMessage, new NetworkManager.PacketCallback(AlertMessageHandler));
            // script control change messages, ie: when an in-world LSL script wants to take control of your agent.
            Network.RegisterCallback(PacketType.ScriptControlChange, new NetworkManager.PacketCallback(ScriptControlChangeHandler));
            // Camera Constraint (probably needs to move to AgentManagerCamera TODO:
            Network.RegisterCallback(PacketType.CameraConstraint, new NetworkManager.PacketCallback(CameraConstraintHandler));
            Network.RegisterCallback(PacketType.ScriptSensorReply, new NetworkManager.PacketCallback(ScriptSensorReplyHandler));
            Network.RegisterCallback(PacketType.AvatarSitResponse, new NetworkManager.PacketCallback(AvatarSitResponseHandler));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="client">Reference to the GridClient object</param>
        public InventoryManager(LoggerInstance log, NetworkManager network, AgentManager self, AssetManager assets)
        {
            _Log = log;
            _Network = network;
            _Assets = assets;
            _Self = self;

            _Network.RegisterCallback(PacketType.UpdateCreateInventoryItem, new NetworkManager.PacketCallback(UpdateCreateInventoryItemHandler));
            _Network.RegisterCallback(PacketType.SaveAssetIntoInventory, new NetworkManager.PacketCallback(SaveAssetIntoInventoryHandler));
            _Network.RegisterCallback(PacketType.BulkUpdateInventory, new NetworkManager.PacketCallback(BulkUpdateInventoryHandler));
            _Network.RegisterCallback(PacketType.MoveInventoryItem, new NetworkManager.PacketCallback(MoveInventoryItemHandler));
            _Network.RegisterCallback(PacketType.InventoryDescendents, new NetworkManager.PacketCallback(InventoryDescendentsHandler));
            _Network.RegisterCallback(PacketType.FetchInventoryReply, new NetworkManager.PacketCallback(FetchInventoryReplyHandler));
            _Network.RegisterCallback(PacketType.ReplyTaskInventory, new NetworkManager.PacketCallback(ReplyTaskInventoryHandler));
            _Network.RegisterEventCallback("ScriptRunningReply", new Caps.EventQueueCallback(ScriptRunningReplyMessageHandler));

            // Watch for inventory given to us through instant message
            _Self.OnInstantMessage += new AgentManager.InstantMessageCallback(Self_OnInstantMessage);

            // Register extra parameters with login and parse the inventory data that comes back
            _Network.RegisterLoginResponseCallback(
                new NetworkManager.LoginResponseCallback(Network_OnLoginResponse),
                new string[] {
                    "inventory-root", "inventory-skeleton", "inventory-lib-root",
                    "inventory-lib-owner", "inventory-skel-lib"});
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="client">Instance of GridClient object to associate with this GridManager instance</param>
		public GridManager(LoggerInstance log, NetworkManager network)
		{
            Log = log;
            Network = network;

            //Network.RegisterCallback(PacketType.MapLayerReply, MapLayerReplyHandler);
            Network.RegisterCallback(PacketType.MapBlockReply, MapBlockReplyHandler);
            Network.RegisterCallback(PacketType.MapItemReply, MapItemReplyHandler);
            Network.RegisterCallback(PacketType.SimulatorViewerTimeMessage, TimeMessageHandler);
            Network.RegisterCallback(PacketType.CoarseLocationUpdate, CoarseLocationHandler);
            Network.RegisterCallback(PacketType.RegionIDAndHandleReply, RegionHandleReplyHandler);
		}
Ejemplo n.º 9
0
        public SimpleClient()
        {
            Log = new LoggerInstance();
            Network = new NetworkManager(Log);
            Throttle = new AgentThrottle(Network);

            Network.RegisterLoginResponseCallback(
                delegate(bool loginSuccess, bool redirect, string message, string reason, LoginResponseData replyData)
                {
                    if (loginSuccess) Log.BotName = replyData.FirstName + " " + replyData.LastName;
                });
        }
Ejemplo n.º 10
0
 public Inventory(LoggerInstance log, InventoryManager manager, UUID owner)
 {
     Log = log;
     Manager = manager;
     _Owner = owner;
     if (owner == UUID.Zero)
         Log.Log("Inventory owned by nobody!", Helpers.LogLevel.Warning);
     Items = new Dictionary<UUID, InventoryNode>();
 }
Ejemplo n.º 11
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public GridClient()
        {
            // These are order-dependant
            Log = new LoggerInstance();
            Network = new NetworkManager(Log);
            Terrain = new TerrainManager(Log, Network);
            Parcels = new ParcelManager(Log, Network, Terrain);
            Self = new AgentManager(Log, Network, Grid);
            Avatars = new AvatarManager(Log, Network);
            Friends = new FriendsManager(Log, Network, Inventory, Self, Avatars);
            Grid = new GridManager(Log, Network);
            Objects = new ObjectManager(Log, Network, Self);
            Groups = new GroupManager(Log, Network, Self);
            Assets = new AssetManager(Log, Network);
            Estate = new EstateTools(Log, Network, Assets);
            Appearance = new AppearanceManager(Log, Network, Inventory, Assets, Objects, Self);
            Inventory = new InventoryManager(Log, Network, Self, Assets);
            Directory = new DirectoryManager(Log, Network);
            Sound = new SoundManager(Log, Network, Self);
            Throttle = new AgentThrottle(Network);

            Settings = new Settings(this);
            //if (Settings.ENABLE_INVENTORY_STORE)
            //    InventoryStore = new Inventory(Inventory);
            //if (Settings.ENABLE_LIBRARY_STORE)
            //    LibraryStore = new Inventory(Inventory);

            //Inventory.OnSkeletonsReceived +=
            //    delegate(InventoryManager manager)
            //    {
            //        if (Settings.ENABLE_INVENTORY_STORE)
            //            InventoryStore.InitializeFromSkeleton(Inventory.InventorySkeleton);
            //        if (Settings.ENABLE_LIBRARY_STORE)
            //            LibraryStore.InitializeFromSkeleton(Inventory.LibrarySkeleton);
            //    };

            Network.RegisterLoginResponseCallback(
                delegate(bool loginSuccess, bool redirect, string message, string reason, LoginResponseData replyData)
                {
                    if (loginSuccess) Log.BotName = replyData.FirstName + " " + replyData.LastName;
                });
        }
Ejemplo n.º 12
0
        public DirectoryManager(LoggerInstance log, NetworkManager network)
        {
            Network = network;
            Log = log;

            Network.RegisterCallback(PacketType.DirClassifiedReply, new NetworkManager.PacketCallback(DirClassifiedReplyHandler));
            Network.RegisterCallback(PacketType.DirLandReply, new NetworkManager.PacketCallback(DirLandReplyHandler));
            Network.RegisterCallback(PacketType.DirPeopleReply, new NetworkManager.PacketCallback(DirPeopleReplyHandler));
            Network.RegisterCallback(PacketType.DirGroupsReply, new NetworkManager.PacketCallback(DirGroupsReplyHandler));
            // Deprecated as of viewer 1.2.3
            Network.RegisterCallback(PacketType.PlacesReply, new NetworkManager.PacketCallback(PlacesReplyHandler));
            Network.RegisterEventCallback("PlacesReply", PlacesReplyEventHandler);
            Network.RegisterCallback(PacketType.DirEventsReply, new NetworkManager.PacketCallback(EventsReplyHandler));
            Network.RegisterCallback(PacketType.EventInfoReply, new NetworkManager.PacketCallback(EventInfoReplyHandler));    

        }
Ejemplo n.º 13
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="client"></param>
 public TerrainManager(LoggerInstance log, NetworkManager network)
 {
     Log = log;
     Network = network;
     Network.RegisterCallback(PacketType.LayerData, new NetworkManager.PacketCallback(LayerDataHandler));
 }
Ejemplo n.º 14
0
        /// <summary>
        /// Internal constructor
        /// </summary>
        /// <param name="client">A reference to the GridClient Object</param>
        internal FriendsManager(LoggerInstance log, NetworkManager network, InventoryManager inventory, AgentManager self, AvatarManager avatars)
        {
            Log = log;
            Network = network;
            Inventory = inventory;
            Self = self;
            Avatars = avatars;

            Network.OnConnected += new NetworkManager.ConnectedCallback(Network_OnConnect);
            Avatars.OnAvatarNames += new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);
            Self.OnInstantMessage += new AgentManager.InstantMessageCallback(MainAvatar_InstantMessage);

            Network.RegisterCallback(PacketType.OnlineNotification, OnlineNotificationHandler);
            Network.RegisterCallback(PacketType.OfflineNotification, OfflineNotificationHandler);
            Network.RegisterCallback(PacketType.ChangeUserRights, ChangeUserRightsHandler);
            Network.RegisterCallback(PacketType.TerminateFriendship, TerminateFriendshipHandler);
            Network.RegisterCallback(PacketType.FindAgent, OnFindAgentReplyHandler);

            Network.RegisterLoginResponseCallback(new NetworkManager.LoginResponseCallback(Network_OnLoginResponse),
                new string[] { "buddy-list" });
        }
Ejemplo n.º 15
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="client">A reference to the GridClient object</param>
 public ParcelManager(LoggerInstance log, NetworkManager network, TerrainManager terrain)
 {
     Log = log;
     Network = network;
     Terrain = terrain;
     // Setup the callbacks
     Network.RegisterCallback(PacketType.ParcelInfoReply, new NetworkManager.PacketCallback(ParcelInfoReplyHandler));
     Network.RegisterEventCallback("ParcelObjectOwnersReply", new Caps.EventQueueCallback(ParcelObjectOwnersReplyHandler));
     // CAPS packet handler, to allow for Media Data not contained in the message template
     Network.RegisterEventCallback("ParcelProperties", new Caps.EventQueueCallback(ParcelPropertiesReplyHandler));
     Network.RegisterCallback(PacketType.ParcelDwellReply, new NetworkManager.PacketCallback(ParcelDwellReplyHandler));
     Network.RegisterCallback(PacketType.ParcelAccessListReply, new NetworkManager.PacketCallback(ParcelAccessListReplyHandler));
     Network.RegisterCallback(PacketType.ForceObjectSelect, new NetworkManager.PacketCallback(SelectParcelObjectsReplyHandler));
     Network.RegisterCallback(PacketType.ParcelMediaUpdate, new NetworkManager.PacketCallback(ParcelMediaUpdateHandler));
     Network.RegisterCallback(PacketType.ParcelOverlay, new NetworkManager.PacketCallback(ParcelOverlayHandler));
 }
Ejemplo n.º 16
0
            /// <summary>Default constructor</summary>
            public AgentMovement(LoggerInstance log, AgentManager self, NetworkManager network)
            {
                Log = log;
                Network = network;
                Self = self;
                Camera = new AgentCamera();

                updateInterval = Settings.DEFAULT_AGENT_UPDATE_INTERVAL;
                updateTimer = new Timer(new TimerCallback(UpdateTimer_Elapsed), null, Settings.DEFAULT_AGENT_UPDATE_INTERVAL,
                    Settings.DEFAULT_AGENT_UPDATE_INTERVAL);
            }
Ejemplo n.º 17
0
        /// <summary>
        /// Default constructor, Instantiates a new copy of the TexturePipeline class
        /// </summary>
        /// <param name="client">Reference to the instantiated <see cref="GridClient"/> object</param>
        public TexturePipeline(LoggerInstance log, NetworkManager network, AssetManager assets)
        {
            _Log = log;
            _Network = network;
            _Assets = assets;
            maxTextureRequests = _Assets.MaxConcurrentTextureDownloads;

            resetEvents = new AutoResetEvent[maxTextureRequests];
            threadpoolSlots = new int[maxTextureRequests];

            _Transfers = new Dictionary<UUID, TaskInfo>();

            // Pre-configure autoreset events and threadpool slots
            for (int i = 0; i < maxTextureRequests; i++)
            {
                resetEvents[i] = new AutoResetEvent(true);
                threadpoolSlots[i] = -1;
            }

            // Handle client connected and disconnected events
            _Network.OnConnected += delegate { Startup(); };
            _Network.OnDisconnected += delegate { Shutdown(); };

            // Instantiate master thread that manages the request pool
            downloadMaster = new Thread(DownloadThread);
            downloadMaster.Name = "TexturePipeline";
            downloadMaster.IsBackground = true;
            
            RefreshDownloadsTimer.Elapsed += RefreshDownloadsTimer_Elapsed;
        }
Ejemplo n.º 18
0
        // FIXME: Create a class-level appearance thread so multiple threads can't be launched

        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="client">This agents <seealso cref="OpenMetaverse.GridClient"/> Object</param>
        /// <param name="assets">Reference to an AssetManager object</param>
        public AppearanceManager(LoggerInstance log, NetworkManager network, InventoryManager inventory, AssetManager assets, ObjectManager objects, AgentManager self)
        {
            Log = log;
            Network = network;
            Inventory = inventory;
            Assets = assets;
            Self = self;
            Objects = objects;

            // Initialize AgentTextures to zero UUIDs
            for (int i = 0; i < AgentTextures.Length; i++)
                AgentTextures[i] = UUID.Zero;

            Network.RegisterCallback(PacketType.AgentWearablesUpdate, new NetworkManager.PacketCallback(AgentWearablesUpdateHandler));
            Network.RegisterCallback(PacketType.AgentCachedTextureResponse, new NetworkManager.PacketCallback(AgentCachedTextureResponseHandler));
            Network.RegisterCallback(PacketType.RebakeAvatarTextures,new NetworkManager.PacketCallback(RebakeAvatarTexturesHandler));
            Network.OnDisconnected += new NetworkManager.DisconnectedCallback(Network_OnDisconnected);
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Constructor for EstateTools class
        /// </summary>
        /// <param name="client"></param>
        public EstateTools(LoggerInstance log, NetworkManager network, AssetManager assets)
        {
            GroundTextures = new GroundTextureSettings();
            GroundTextureLimits = new GroundTextureHeightSettings();

            Log = log;
            Network = network;
            Assets = assets;
            Network.RegisterCallback(PacketType.LandStatReply, new NetworkManager.PacketCallback(LandStatReplyHandler));
            Network.RegisterCallback(PacketType.EstateOwnerMessage, new NetworkManager.PacketCallback(EstateOwnerMessageHandler));
            Network.RegisterCallback(PacketType.EstateCovenantReply, new NetworkManager.PacketCallback(EstateCovenantReplyHandler));
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Group Management Routines, Methods and Packet Handlers
        /// </summary>
        /// <param name="client">A reference to the current <seealso cref="GridClient"/> instance</param>
        public GroupManager(LoggerInstance log, NetworkManager network, AgentManager self)
        {
            Log = log;
            Network = network;
            Self = self;

            GroupMembersCaches = new InternalDictionary<UUID, Dictionary<UUID, GroupMember>>();
            GroupMembersRequests = new List<UUID>();
            GroupRolesCaches = new InternalDictionary<UUID, Dictionary<UUID, GroupRole>>();
            GroupRolesRequests = new List<UUID>();
            GroupRolesMembersCaches = new InternalDictionary<UUID, List<KeyValuePair<UUID, UUID>>>();
            GroupRolesMembersRequests = new List<UUID>();
            GroupName2KeyCache  = new InternalDictionary<UUID, string>();

            Network.RegisterEventCallback("AgentGroupDataUpdate", new Caps.EventQueueCallback(AgentGroupDataUpdateHandler));
            Network.RegisterCallback(PacketType.AgentDropGroup, new NetworkManager.PacketCallback(AgentDropGroupHandler));
            Network.RegisterCallback(PacketType.GroupTitlesReply, new NetworkManager.PacketCallback(GroupTitlesHandler));
            Network.RegisterCallback(PacketType.GroupProfileReply, new NetworkManager.PacketCallback(GroupProfileHandler));
            Network.RegisterCallback(PacketType.GroupMembersReply, new NetworkManager.PacketCallback(GroupMembersHandler));
            Network.RegisterCallback(PacketType.GroupRoleDataReply, new NetworkManager.PacketCallback(GroupRoleDataHandler));
            Network.RegisterCallback(PacketType.GroupRoleMembersReply, new NetworkManager.PacketCallback(GroupRoleMembersHandler));
            Network.RegisterCallback(PacketType.GroupActiveProposalItemReply, new NetworkManager.PacketCallback(GroupActiveProposalItemHandler));
            Network.RegisterCallback(PacketType.GroupVoteHistoryItemReply, new NetworkManager.PacketCallback(GroupVoteHistoryItemHandler));
            Network.RegisterCallback(PacketType.GroupAccountSummaryReply, new NetworkManager.PacketCallback(GroupAccountSummaryHandler));
            Network.RegisterCallback(PacketType.CreateGroupReply, new NetworkManager.PacketCallback(CreateGroupReplyHandler));
            Network.RegisterCallback(PacketType.JoinGroupReply, new NetworkManager.PacketCallback(JoinGroupReplyHandler));
            Network.RegisterCallback(PacketType.LeaveGroupReply, new NetworkManager.PacketCallback(LeaveGroupReplyHandler));
            Network.RegisterCallback(PacketType.UUIDGroupNameReply, new NetworkManager.PacketCallback(UUIDGroupNameReplyHandler));
            Network.RegisterCallback(PacketType.EjectGroupMemberReply, new NetworkManager.PacketCallback(EjectGroupMemberReplyHandler));
            Network.RegisterCallback(PacketType.GroupNoticesListReply, new NetworkManager.PacketCallback(GroupNoticesListReplyHandler));
        }
Ejemplo n.º 21
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="client"></param>
 public PacketEventDictionary(LoggerInstance log)
 {
     Log = log;
     _ThreadPoolCallback = new WaitCallback(ThreadPoolDelegate);
 }