コード例 #1
0
 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;
         }
     }
 }
コード例 #2
0
 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();
 }