S
shout
I am creating a game logon client and have an event that happens when
a packet is recived. It seems like I tried to make my cat write the
code. Could someone tell me what is wrong?
/// <summary>
/// What ever you want it to be.
/// </summary>
/// <param name="e">...</param>
protected virtual void OnRecivePacket(BnetPacketArgs e)
{
if (BnetSocket.Available != 0)
{
RecivePacket(this, e);
}
}
/// <summary>
/// Delegate
/// </summary>
public delegate void BnetPacketHandler(object sender,
BnetPacketArgs e);
/// <summary>
/// Event
/// </summary>
public event BnetPacketHandler RecivePacket;
/// <summary>
/// Sends the packet to packet storage.
/// </summary>
private void bnetSocket_RecivePacket(object sender,
BnetPacketArgs e)
{
PS.AddPacket(e.inBuffer);
}
And I also have this in the class constructor.
[code:1:b4efebec0a]this.RecivePacket += new
BnetPacketHandler(bnetSocket_RecivePacket);[/code:1:b4efebec0a]
Could someone tell me what I'm doing wrong?
a packet is recived. It seems like I tried to make my cat write the
code. Could someone tell me what is wrong?
/// <summary>
/// What ever you want it to be.
/// </summary>
/// <param name="e">...</param>
protected virtual void OnRecivePacket(BnetPacketArgs e)
{
if (BnetSocket.Available != 0)
{
RecivePacket(this, e);
}
}
/// <summary>
/// Delegate
/// </summary>
public delegate void BnetPacketHandler(object sender,
BnetPacketArgs e);
/// <summary>
/// Event
/// </summary>
public event BnetPacketHandler RecivePacket;
/// <summary>
/// Sends the packet to packet storage.
/// </summary>
private void bnetSocket_RecivePacket(object sender,
BnetPacketArgs e)
{
PS.AddPacket(e.inBuffer);
}
And I also have this in the class constructor.
[code:1:b4efebec0a]this.RecivePacket += new
BnetPacketHandler(bnetSocket_RecivePacket);[/code:1:b4efebec0a]
Could someone tell me what I'm doing wrong?