Upload() public method

Execute the upload task on the socket.
Execute the upload task on the socket.
System.IO.IOException
public Upload ( InputStream input, OutputStream output, OutputStream messages ) : void
input Sharpen.InputStream /// raw input to read client commands from. Caller must ensure the /// input is buffered, otherwise read performance may suffer. ///
output Sharpen.OutputStream /// response back to the Git network client, to write the pack /// data onto. Caller must ensure the output is buffered, /// otherwise write performance may suffer. ///
messages Sharpen.OutputStream /// secondary "notice" channel to send additional messages out /// through. When run over SSH this should be tied back to the /// standard error channel of the command execution. For most /// other network connections this should be null. ///
return void
コード例 #1
0
ファイル: TransportLocal.cs プロジェクト: ashmind/ngit
 public override void Run()
 {
     try
     {
         UploadPack rp = this._enclosing._enclosing.CreateUploadPack(dst);
         rp.Upload(out_r, in_w, null);
     }
     catch (IOException err)
     {
         Sharpen.Runtime.PrintStackTrace(err);
     }
     catch (RuntimeException err)
     {
         Sharpen.Runtime.PrintStackTrace(err);
     }
     finally
     {
         try
         {
             out_r.Close();
         }
         catch (IOException)
         {
         }
         try
         {
             in_w.Close();
         }
         catch (IOException)
         {
         }
         dst.Close();
     }
 }
コード例 #2
0
            /// <exception cref="System.IO.IOException"></exception>
            /// <exception cref="NGit.Transport.Resolver.ServiceNotEnabledException"></exception>
            /// <exception cref="NGit.Transport.Resolver.ServiceNotAuthorizedException"></exception>
            internal override void Execute(DaemonClient dc, Repository db)
            {
                UploadPack   up   = this._enclosing.uploadPackFactory.Create(dc, db);
                InputStream  @in  = dc.GetInputStream();
                OutputStream @out = dc.GetOutputStream();

                up.Upload(@in, @out, null);
            }
コード例 #3
0
 public override void Upload(Stream inputStream, Stream outputStream)
 {
     using (var repository = GetRepository())
     {
         var pack = new UploadPack(repository);
         pack.SetBiDirectionalPipe(false);
         pack.Upload(inputStream, outputStream, outputStream);
     }
 }
コード例 #4
0
ファイル: Daemon.cs プロジェクト: nickname100/monodevelop
			/// <exception cref="System.IO.IOException"></exception>
			internal override void Execute(DaemonClient dc, Repository db)
			{
				UploadPack rp = new UploadPack(db);
				InputStream @in = dc.GetInputStream();
				rp.SetTimeout(this._enclosing.GetTimeout());
				rp.SetPackConfig(this._enclosing.packConfig);
				rp.Upload(@in, dc.GetOutputStream(), null);
			}