public static void HookRawMessageSends(Action <IPEndPoint, byte[]> callback) { s_rawMessageSends.Add((e, b) => { try { callback(e, b); } catch (Exception ex) { Mantis.Warning("Raw message send consumer may miss message: {0}", ex.Message); } }); }
public static void HookBreweryMessages(Action <Protocol.BreweryMessage> callback) { s_breweryMessages.Add((b) => { try { callback(b); } catch (Exception ex) { Mantis.Warning("Brewery message recv consumer may miss message: {0}", ex.Message); } }); }
public static void HookRawMessagePump(Action <UdpReceiveResult> callback) { s_rawMessagePump.Add((u) => { try { callback(u); } catch (Exception ex) { Mantis.Warning("Raw message recv consumer may miss message: {0}", ex.Message); } }); }