Пример #1
0
 /// <exception cref="NGit.Errors.TransportException"></exception>
 public TcpPushConnection(TransportGitAnon _enclosing) : base(_enclosing)
 {
     this._enclosing = _enclosing;
     this.sock       = this._enclosing.OpenConnection();
     try
     {
         InputStream  sIn  = this.sock.GetInputStream();
         OutputStream sOut = this.sock.GetOutputStream();
         sIn  = new BufferedInputStream(sIn);
         sOut = new SafeBufferedOutputStream(sOut);
         this.Init(sIn, sOut);
         this._enclosing.Service("git-receive-pack", this.pckOut);
     }
     catch (IOException err)
     {
         this.Close();
         throw new TransportException(this.uri, JGitText.Get().remoteHungUpUnexpectedly, err
                                      );
     }
     this.ReadAdvertisedRefs();
 }
Пример #2
0
			/// <exception cref="NGit.Errors.TransportException"></exception>
			public TcpPushConnection(TransportGitAnon _enclosing) : base(_enclosing)
			{
				this._enclosing = _enclosing;
				this.sock = this._enclosing.OpenConnection();
				try
				{
					InputStream sIn = this.sock.GetInputStream();
					OutputStream sOut = this.sock.GetOutputStream();
					sIn = new BufferedInputStream(sIn);
					sOut = new BufferedOutputStream(sOut);
					this.Init(sIn, sOut);
					this._enclosing.Service("git-receive-pack", this.pckOut);
				}
				catch (IOException err)
				{
					this.Close();
					throw new TransportException(this.uri, JGitText.Get().remoteHungUpUnexpectedly, err
						);
				}
				this.ReadAdvertisedRefs();
			}