当前位置: 首页>>代码示例>>C#>>正文


C# OpenMetaverse.NetworkManager类代码示例

本文整理汇总了C#中OpenMetaverse.NetworkManager的典型用法代码示例。如果您正苦于以下问题:C# NetworkManager类的具体用法?C# NetworkManager怎么用?C# NetworkManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


NetworkManager类属于OpenMetaverse命名空间,在下文中一共展示了NetworkManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegisterEvent

 /// <summary>
 /// Register an event handler
 /// </summary>
 /// <remarks>Use PacketType.Default to fire this event on every 
 /// incoming packet</remarks>
 /// <param name="packetType">Packet type to register the handler for</param>
 /// <param name="eventHandler">Callback to be fired</param>
 public void RegisterEvent(PacketType packetType, NetworkManager.PacketCallback eventHandler)
 {
     lock (_EventTable)
     {
         if (_EventTable.ContainsKey(packetType))
             _EventTable[packetType] += eventHandler;
         else
             _EventTable[packetType] = eventHandler;
     }
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:17,代码来源:EventDictionary.cs

示例2: DisconnectHandler

 public static void DisconnectHandler(NetworkManager.DisconnectType type, string message)
 {
     if (type == NetworkManager.DisconnectType.NetworkTimeout)
     {
         Console.WriteLine("Network connection timed out, disconnected");
     }
     else if (type == NetworkManager.DisconnectType.ServerInitiated)
     {
         Console.WriteLine("Server disconnected us: " + message);
     }
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:11,代码来源:PacketDump.cs

示例3: RegisterLoginResponseCallback

 public void RegisterLoginResponseCallback(NetworkManager.LoginResponseCallback callback, string[] options)
 {
     return;
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:4,代码来源:MockNetworkManager.cs

示例4: Network_OnDisconnected

 private void Network_OnDisconnected(NetworkManager.DisconnectType reason, string message)
 {
     if (InterpolationTimer != null)
     {
         InterpolationTimer.Dispose();
         InterpolationTimer = null;
     }
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:8,代码来源:ObjectManager.cs

示例5: Network_OnDisconnected

 public void Network_OnDisconnected(NetworkManager.DisconnectType reason, string message)
 {
     if (OnDisconnected != null)
     {
         OnDisconnected(this, EventType.DISCONNECTED);
     }
 }
开发者ID:kf6kjg,项目名称:halcyon,代码行数:7,代码来源:PhysicsBot.cs

示例6: GroupManager

        /// <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));
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:35,代码来源:GroupManager.cs

示例7: Simulator

        //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);
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:25,代码来源:Simulator.cs

示例8: Network_OnDisconnected

        private void Network_OnDisconnected(NetworkManager.DisconnectType reason, string message)
        {
            if (RebakeScheduleTimer != null)
            {
                RebakeScheduleTimer.Dispose();
                RebakeScheduleTimer = null;
            }

            if (AppearanceThread != null)
            {
                if (AppearanceThread.IsAlive)
                {
                    AppearanceThread.Abort();
                }
                AppearanceThread = null;
                AppearanceThreadRunning = 0;
            }
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:18,代码来源:AppearanceManager.cs

示例9: UnregisterEvent

 /// <summary>
 /// Unregister an event handler
 /// </summary>
 /// <param name="packetType">Packet type to unregister the handler for</param>
 /// <param name="eventHandler">Callback to be unregistered</param>
 public void UnregisterEvent(PacketType packetType, NetworkManager.PacketCallback eventHandler)
 {
     lock (_EventTable)
     {
         if (_EventTable.ContainsKey(packetType) && _EventTable[packetType] != null)
             _EventTable[packetType] -= eventHandler;
     }
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:13,代码来源:EventDictionary.cs

示例10: GridManager

        /// <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);
		}
开发者ID:RavenB,项目名称:gridsearch,代码行数:16,代码来源:GridManager.cs

示例11: AgentMovement

            /// <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);
            }
开发者ID:RavenB,项目名称:gridsearch,代码行数:12,代码来源:AgentManagerMovement.cs

示例12: Network_OnDisconnected

 private void Network_OnDisconnected(NetworkManager.DisconnectType reason, string message)
 {
     CleanupTimer();
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:4,代码来源:AgentManagerMovement.cs

示例13: FriendsManager

        /// <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" });
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:25,代码来源:FriendsManager.cs

示例14: AppearanceManager

        // 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);
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:25,代码来源:AppearanceManager.cs

示例15: Network_OnDisconnected

 void Network_OnDisconnected(NetworkManager.DisconnectType reason, string message)
 {
     ParcelsDownloaded.Set();
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:4,代码来源:ParcelInfoCommand.cs


注:本文中的OpenMetaverse.NetworkManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。