C# Class GitSharp.Core.Transport.Daemon

Basic daemon for the anonymous git:// transport protocol.
Datei anzeigen Open project: jagregory/GitSharp Class Usage Examples

Public Methods

Method Description
Daemon ( ) : System

Configure a daemon to listen on any available network port.

Daemon ( IPEndPoint addr ) : System

Configure a new daemon for the specified network address.

ExportDirectory ( DirectoryInfo dir ) : void

Recursively export all Git repositories within a directory.

ExportRepository ( string name, Repository db ) : void

Add a single repository to the set that is exported by this daemon. The existence (or lack-thereof) of git-daemon-export-ok is ignored by this method. The repository is always published.

GetService ( string name ) : GitSharp.Core.Transport.DaemonService

* Lookup a supported service so it can be reconfigured.

MatchService ( string cmd ) : GitSharp.Core.Transport.DaemonService
OpenRepository ( string name ) : Repository
Start ( ) : void

Start this daemon on a background thread.

Stop ( ) : void

Stop this daemon.

isRunning ( ) : bool

Private Methods

Method Description
CanExport ( DirectoryInfo d ) : bool
OpenRepository ( DirectoryInfo f ) : Repository
startClient ( Socket s ) : void

Method Details

Daemon() public method

Configure a daemon to listen on any available network port.
public Daemon ( ) : System
return System

Daemon() public method

Configure a new daemon for the specified network address.
public Daemon ( IPEndPoint addr ) : System
addr System.Net.IPEndPoint /// Address to listen for connections on. If null, any available /// port will be chosen on all network interfaces. ///
return System

ExportDirectory() public method

Recursively export all Git repositories within a directory.
public ExportDirectory ( DirectoryInfo dir ) : void
dir System.IO.DirectoryInfo /// the directory to export. This directory must not itself be a /// git repository, but any directory below it which has a file /// named git-daemon-export-ok will be published. ///
return void

ExportRepository() public method

Add a single repository to the set that is exported by this daemon. The existence (or lack-thereof) of git-daemon-export-ok is ignored by this method. The repository is always published.
public ExportRepository ( string name, Repository db ) : void
name string /// name the repository will be published under. ///
db Repository the repository instance.
return void

GetService() public method

* Lookup a supported service so it can be reconfigured.
public GetService ( string name ) : GitSharp.Core.Transport.DaemonService
name string /// Name of the service; e.g. "receive-pack"/"git-receive-pack" or /// "upload-pack"/"git-upload-pack". ///
return GitSharp.Core.Transport.DaemonService

MatchService() public method

public MatchService ( string cmd ) : GitSharp.Core.Transport.DaemonService
cmd string
return GitSharp.Core.Transport.DaemonService

OpenRepository() public method

public OpenRepository ( string name ) : Repository
name string
return Repository

Start() public method

Start this daemon on a background thread.
/// the server socket could not be opened. /// /// the daemon is already running. ///
public Start ( ) : void
return void

Stop() public method

Stop this daemon.
public Stop ( ) : void
return void

isRunning() public method

public isRunning ( ) : bool
return bool