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. /// |
리턴 | 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();
}
public override void Execute(DaemonClient client, Repository db) { var rp = new UploadPack(db); Stream stream = client.Stream; rp.Upload(stream, null, null); }