protected virtual void Dispose(bool disposing) { if (disposing) { if (socket != null) { socket.Close(); socket = null; } if (server != null) { server.ListenerSocket.Close(); server.Dispose(); server = null; } if (filePreview != null) { filePreview.Dispose(); filePreview = null; } } }
private void InitiateFileTail(IWebSocketConnection Socket) { socket = Socket; filePreview = new FilePreview(filePath); filePreview.FileRead += new EventHandler(filepreview_FileReadChangesArrived); filePreview.ChangesArrived += new EventHandler(filepreview_FileReadChangesArrived); filePreview.Error += new UnhandledExceptionEventHandler(filepreview_Error); filePreview.StartTrackingFileTail(); }