Author | Message | Time |
---|---|---|
shout | I am trying to create an event that is triggerd by reciving a packet but it does not work. [code] #region Recive Packet Event Group protected virtual void OnRecivePacket(BnetPacketArgs e) { if (BnetSocket.Available != 0) { RecivePacket(this, e); } } public delegate void BnetPacketHandler(object sender, BnetPacketArgs e); public event BnetPacketHandler RecivePacket; private void bnetSocket_RecivePacket(object sender, BnetPacketArgs e) { PS.AddPacket(e.inBuffer); } #endregion [/code] And this is in the constructor: [code] this.RecivePacket += new BnetPacketHandler(bnetSocket_RecivePacket); [/code] Could someone tell me what I am doing wrong? | July 30, 2004, 5:43 PM |
ChR0NiC | Although I doubt this is relevant, you misspelled "Receive" you spelled it "Recive" | July 30, 2004, 7:48 PM |
Myndfyr | Please avoid double-posts. This question was correctly asked on the .NET Platform forum, and does not belong here. | July 31, 2004, 12:34 AM |