GitSharp.Core.Transport.UploadPack.Upload C# (CSharp) Method

Upload() public method

Execute the upload task on the socket.
public Upload ( Stream input, Stream output, Stream messages ) : void
input Stream /// raw input to read client commands from. Caller must ensure the /// input is buffered, otherwise read performance may suffer. ///
output Stream /// 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 Stream /// 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
        public void Upload(Stream input, Stream output, Stream messages)
        {
            _rawIn = input;
            _rawOut = output;

            if (_timeout > 0)
            {
                var i = new TimeoutStream(_rawIn, _timeout * 1000);
                var o = new TimeoutStream(_rawOut, _timeout * 1000);
                _rawIn = i;
                _rawOut = o;
            }

            _pckIn = new PacketLineIn(_rawIn);
            _pckOut = new PacketLineOut(_rawOut);
            Service();
        }

Usage Example

Esempio n. 1
0
            public override void Execute(DaemonClient client, Repository db)
            {
                var    rp     = new UploadPack(db);
                Stream stream = client.Stream;

                rp.Upload(stream, null, null);
            }
All Usage Examples Of GitSharp.Core.Transport.UploadPack::Upload