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


C# Network.PacketHandler类代码示例

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


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

示例1: AddReceivePacket

 public void AddReceivePacket(byte[] processedBytes, int length, string message, PacketHandler handler)
 {
     byte[] toAdd = new byte[processedBytes.Length];
     for (int i = 0; i < length; i++)
     {
         toAdd[i] = processedBytes[i];
     }
     Packets.Enqueue(new PacketReceiveSimulation(toAdd, length, message, handler));
     Console.WriteLine("Logging Received Packet: " + PacketHandlers.Handlers[handler.PacketID].OnReceive.Method.ToString());
 }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:10,代码来源:PacketSimulation.cs

示例2: Initialize

        public static void Initialize()
        {
            m_OldEFHandler = PacketHandlers.GetHandler(0xEF);
            PacketHandlers.Register(0xEF, 21, false, new Server.Network.OnPacketReceive(LoginServerSeed));
            PacketHandlers.Register(Config.EncapsulationHeader, 0, false, new Server.Network.OnPacketReceive(UOExtPacket));

            uint ip = (uint)(BitConverter.ToInt32(IPAddress.Parse(Config.IP).GetAddressBytes(), 0));

            m_UOExtSupport = new UOExtSupport();
            m_UOExtSupport.SetStatic();

            m_handler = UOExt.PacketHandler.Instatinate();

            Console.WriteLine("UOExt: Adapter started.");
        }
开发者ID:WildGenie,项目名称:uo-ext,代码行数:15,代码来源:UOExtAdapter.cs

示例3: Configure

		public static void Configure()
		{
			EventSink.QuestGumpRequest += XmlQuest.QuestButton;

			ContentChangeParent = PacketHandlers.GetHandler(0x66);
			UseReqParent = PacketHandlers.GetHandler(0x06);
			LookReqParent = PacketHandlers.GetHandler(0x09);

			PacketHandlers.Register(0x66, 0, true, BaseEntryBook.ContentChange);
			PacketHandlers.Register(0x06, 5, true, XmlAttach.UseReq);
			PacketHandlers.Register(0x09, 5, true, XmlAttach.LookReq);

			#if CLIENT6017
			PacketHandlers.Register6017(0x66, 0, true, BaseEntryBook.ContentChange);
			PacketHandlers.Register6017(0x06, 5, true, XmlAttach.UseReq);
			PacketHandlers.Register6017(0x09, 5, true, XmlAttach.LookReq);
			#endif
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:18,代码来源:PacketHandlerOverrides.cs

示例4: RegisterExtended

		public static void RegisterExtended( int packetID, bool ingame, OnPacketReceive onReceive )
		{
			if ( packetID >= 0 && packetID < 0x100 )
				m_ExtendedHandlersLow[packetID] = new PacketHandler( packetID, 0, ingame, onReceive );
			else
				m_ExtendedHandlersHigh[packetID] = new PacketHandler( packetID, 0, ingame, onReceive );
		}
开发者ID:Grimoric,项目名称:RunUO.2.3.r1083,代码行数:7,代码来源:PacketHandlers.cs

示例5: Register6017

		public static void Register6017( int packetID, int length, bool ingame, OnPacketReceive onReceive )
		{
			m_6017Handlers[packetID] = new PacketHandler( packetID, length, ingame, onReceive );
		}
开发者ID:Grimoric,项目名称:RunUO.2.3.r1083,代码行数:4,代码来源:PacketHandlers.cs

示例6: Register

 public static void Register(int packetID, bool ingame, OnPacketReceive onReceive)
 {
     m_Handlers[packetID] = new PacketHandler(packetID, 0, ingame, onReceive);
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:4,代码来源:ProtocolExtensions.cs

示例7: PacketReceiveSimulation

 public PacketReceiveSimulation(byte[] sentBytes, int length, string message, PacketHandler handler) 
     : base(sentBytes, length, message)
 {
     Handler = handler;
 }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:5,代码来源:PacketSimulation.cs


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