• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# OnPacketReceive类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: PacketHandler

 public PacketHandler( PacketType packetID, int length, int minimunLength, OnPacketReceive onReceive )
 {
     _PacketID = packetID;
     _Length = length;
     _MinimumLength = minimunLength;
     _OnReceive = onReceive;
 }
开发者ID:Smjert,项目名称:CXMineServer,代码行数:7,代码来源:PacketHandler.cs


示例2: PacketHandler

 public PacketHandler(PacketType type, int length, int minimumLength, OnPacketReceive onReceive)
 {
     _PacketId = type;
     _Length = length;
     _MinimumLength = minimumLength;
     _OnReceive = onReceive;
 }
开发者ID:AVATAR-Phoenix,项目名称:c-raft,代码行数:7,代码来源:PacketHandler.cs


示例3: PacketHandler

 public PacketHandler(int packetID, int length, bool registeredonly, OnPacketReceive onReceive)
 {
     this.m_PacketID = packetID;
     this.m_Length = length;
     this.m_RegisteredOnly = registeredonly;
     this.m_OnReceive = onReceive;
 }
开发者ID:unrealord,项目名称:GunBoundWC,代码行数:7,代码来源:PacketHandler.cs


示例4: RegisterExtended

 public void RegisterExtended(int packetID, OnPacketReceive onReceive)
 {
     if (packetID >= 0 && packetID < 0x100)
         _extendedHandlersLow[packetID] = new PacketHandler(packetID, 0, onReceive);
     else
         _extendedHandlersHigh[packetID] = new PacketHandler(packetID, 0, onReceive);
 }
开发者ID:andyhebear,项目名称:HappyQ-WowServer,代码行数:7,代码来源:PacketHandlers.cs


示例5: ClientPacketHandler

 public ClientPacketHandler(PacketType type, int length, int minimumLength, OnPacketReceive onReceive)
 {
     _packetId = type;
     _length = length;
     _minimumLength = minimumLength;
     _onReceive = onReceive;
 }
开发者ID:DynaStudios,项目名称:Slaysher,代码行数:7,代码来源:ClientPacketHandler.cs


示例6: Register

		/// <summary>
		/// Registers a Packet to Listen for
		/// </summary>
		/// <param name="name"> </param>
		/// <param name="packetID">PacketID</param>
		/// <param name="length">
		/// Length of the Incoming Data
		/// <para>NOTE: this must be EXACTLY the Length! Too much Data will be handled as a new Packet!</para>
		/// </param>
		/// <param name="onReceive">CallBack Function - will be called on Packet income</param>
		public static void Register(string name, short packetID, int length, OnPacketReceive onReceive) {
			if (Handlers.ContainsKey(packetID)) {
				throw new Exception(String.Format("Packet {0} already exists!", packetID));
			}

			Handlers.Add(packetID, new PacketHandler(name, packetID, length, onReceive));
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:17,代码来源:PacketHandlers.cs


示例7: PacketHandler

		public PacketHandler(int packetID, int length, bool ingame, OnPacketReceive onReceive)
		{
			m_PacketID = packetID;
			m_Length = length;
			m_Ingame = ingame;
			m_OnReceive = onReceive;
		}
开发者ID:zerodowned,项目名称:JustUO-merged-with-EC-Support,代码行数:7,代码来源:PacketHandler.cs


示例8: Configure

        public static void Configure()
        {
            PacketHandlers.RemoveExtendedHandler( 0x13 );
            PacketHandlers.RemoveExtendedHandler( 0x15 );

            OnPacketReceive handler = new OnPacketReceive( EmptyHandler );
            PacketHandlers.RegisterExtended( 0x13,  true, handler );
            PacketHandlers.RegisterExtended( 0x15,  true, handler );
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:9,代码来源:Disabled.cs


示例9: PacketHandler

        /// <summary>
        /// Constructs a new PacketHandler instance.
        /// </summary>
        /// <param name="id">The ID of the ProcessedPacket instance to handle.</param>
        /// <param name="Encrypted">Is the ProcessedPacket instance encrypted?</param>
        /// <param name="size">The size of the ProcessedPacket instance. 0 if variable length.</param>
        /// <param name="handler">A OnPacketReceive instance.</param>
        public PacketHandler(byte id, bool Encrypted, ushort size, OnPacketReceive handler)
        {
            this.m_ID = id;
            this.m_Length = size;
            this.m_Handler = handler;
            this.m_Encrypted = Encrypted;

            if (size == 0)
                m_VarLength = true;
            else
                m_VarLength = false;
        }
开发者ID:ddfczm,项目名称:Project-Dollhouse,代码行数:19,代码来源:PacketHandler.cs


示例10: Initialize

        public static void Initialize()
        {
            m_OldWalkReq = Server.Network.PacketHandlers.GetHandler( 0x02 ).OnReceive;

            Server.Network.PacketHandlers.Register( 0x02,   7,  true, new OnPacketReceive( MovementHandler ) );

            Server.Network.PacketHandlers.Register( 0xAD,   0,  true, new OnPacketReceive( UnicodeSpeech ) );

            new MovementController().Start();

            Mobile.AsciiClickMessage = true;
            Mobile.GuildClickMessage = true;
            Mobile.DisableHiddenSelfClick = false;

            EventSink.Login += new LoginEventHandler( OnLogin );
            EventSink.Logout += new LogoutEventHandler( OnLogout );
            EventSink.Connected += new ConnectedEventHandler( EventSink_Connected );
            EventSink.Disconnected += new DisconnectedEventHandler( EventSink_Disconnected );
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:19,代码来源:PlayerMobile.cs


示例11: Register

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


示例12: Register

 public static void Register(PacketType packetId, int length, int minimumLength, OnPacketReceive onReceive)
 {
     MHandlers[(byte) packetId] = new PacketHandler(packetId, length, minimumLength, onReceive);
 }
开发者ID:DynaStudios,项目名称:Slaysher,代码行数:4,代码来源:PacketHandlers.cs


示例13: Register

 private static void Register(short opcode, OnPacketReceive<LoginConnection> e)
 {
     m_LHandlers[opcode] = new PacketHandler<LoginConnection>(opcode, e);
     m_Maintained++;
 }
开发者ID:ExpTeam,项目名称:trunk,代码行数:5,代码来源:DelegateList.cs


示例14: PacketHandler

		/// <summary>
		/// Registers a new PacketHandler for a single Packet
		/// </summary>
		/// <param name="packetID"></param>
		/// <param name="length"></param>
		/// <param name="ingame"></param>
		/// <param name="onReceive"></param>
		public PacketHandler(string name, short packetID, int length, OnPacketReceive onReceive) {
			mName = name;
			mPacketID = packetID;
			mLength = length;
			mOnReceive = onReceive;
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:13,代码来源:PacketHandler.cs


示例15: PacketHandler

 public PacketHandler(int packetId, int length, OnPacketReceive onReceive)
 {
     _packetId = packetId;
     _length = length;
     _onReceive = onReceive;
 }
开发者ID:andyhebear,项目名称:HappyQ-WowServer,代码行数:6,代码来源:PacketHandler.cs


示例16: Register

 public void Register(int packetID, int length, bool ingame, OnPacketReceive onReceive)
 {
     _handlers[packetID] = new PacketHandler(packetID, length, onReceive);
 }
开发者ID:andyhebear,项目名称:HappyQ-WowServer,代码行数:4,代码来源:PacketHandlers.cs


示例17: PacketHandler

 public PacketHandler(int packetId, int length, OnPacketReceive onReceive)
 {
     m_PacketID = packetId;
     m_Length = length;
     m_OnReceive = onReceive;
 }
开发者ID:nazariitashak,项目名称:UOMachine,代码行数:6,代码来源:PacketHandler.cs


示例18: 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


示例19: Register

 public static void Register(int PacketID, int length, bool loggedin, OnPacketReceive onReceive)
 {
     Handlers[PacketID] = new PacketHandler(PacketID, length, loggedin, onReceive);
 }
开发者ID:unrealord,项目名称:GunBoundWC,代码行数:4,代码来源:PacketHandlers.cs


示例20: Register

 public static void Register(byte id, int size, OnPacketReceive handler)
 {
     //2 bytes for header
     //Why is this here? This is fucking things up!
     /*if (size != 0)
     {
         size += 2;
     }*/
     m_Handlers.Add(id, new PacketHandler(id, size, handler));
 }
开发者ID:ddfczm,项目名称:Project-Dollhouse,代码行数:10,代码来源:PacketHandlers.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# OnPathDelegate类代码示例发布时间:2022-05-24
下一篇:
C# Omni类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap