public void Flush_DoesNothing() { using (var stream = new BlockingMemoryStream()) { // Just to make sure this doesn't throw an exception or anything like that. stream.Flush(); } }
public bool MonitorEventAvailable(SIPMonitorEvent monitorEvent) { try { SIPMonitorConsoleEvent consoleEvent = monitorEvent as SIPMonitorConsoleEvent; if (consoleEvent != null && consoleEvent.SessionID == m_notificationsSessionID) { OutStream.Write(Encoding.ASCII.GetBytes(consoleEvent.ToConsoleString(AdminId))); OutStream.Flush(); return(true); } return(false); } catch (Exception excp) { logger.Error("Exception SIPSorceryVT100Server NotificationReady. " + excp.Message); return(false); } }