예제 #1
0
        public void Execute(Stream inout)
        {
            Stream = inout;
            string cmd = new PacketLineIn(inout).ReadStringRaw();

            if (string.IsNullOrEmpty(cmd))
            {
                return;
            }

            int nul = cmd.IndexOf('\0');

            if (nul >= 0)
            {
                cmd = cmd.Slice(0, nul);
            }

            DaemonService srv = Daemon.MatchService(cmd);

            if (srv == null)
            {
                return;
            }
            srv.Execute(this, cmd);
        }
예제 #2
0
 ///	<summary>
 /// Configure a new daemon for the specified network address.
 ///	</summary>
 ///	<param name="addr">
 /// Address to listen for connections on. If null, any available
 /// port will be chosen on all network interfaces.
 /// </param>
 public Daemon(IPEndPoint addr)
 {
     MyAddress  = addr;
     Exports    = new Dictionary <string, Repository>();
     ExportBase = new List <DirectoryInfo>();
     Processors = new Dictionary <string, Thread>();
     Services   = new DaemonService[] { new UploadPackService(), new ReceivePackService() };
 }
예제 #3
0
파일: Daemon.cs 프로젝트: dev218/GitSharp
		///	<summary>
		/// Configure a new daemon for the specified network address.
		///	</summary>
		///	<param name="addr">
		/// Address to listen for connections on. If null, any available
		/// port will be chosen on all network interfaces.
		/// </param>
		public Daemon(IPEndPoint addr)
		{
			MyAddress = addr;
			Exports = new Dictionary<string, Repository>();
			ExportBase = new List<DirectoryInfo>();
			Processors = new Dictionary<string, Thread>();
			Services = new DaemonService[] { new UploadPackService(), new ReceivePackService() };
		}