BadPacket Event
Fired for erroneous and/or malformed messages.
Syntax
typedef struct { String Packet; DynamicArray<Byte> PacketB; String SourceAddress; int SourcePort; int ErrorCode; String ErrorDescription; bool Report; } TipnSNMPTCPMgrBadPacketEventParams; typedef void __fastcall (__closure *TipnSNMPTCPMgrBadPacketEvent)(System::TObject* Sender, TipnSNMPTCPMgrBadPacketEventParams *e); __property TipnSNMPTCPMgrBadPacketEvent OnBadPacket = { read=FOnBadPacket, write=FOnBadPacket };
Remarks
The full message is provided in the Packet parameter.
The BadPacket event is also fired when authentication fails for received packets due to a bad password or other reasons.
If the Report parameter is set to True, an unauthenticated error report will be sent to the client, otherwise the packet will be silently ignored.