C# Class BitSharper.Discovery.IrcDiscovery

IrcDiscovery provides a way to find network peers by joining a pre-agreed rendevouz point on the LFnet IRC network.
Inheritance: IPeerDiscovery
Datei anzeigen Open project: TangibleCryptography/BitSharper Class Usage Examples

Public Methods

Method Description
GetPeers ( ) : IEnumerable

Returns a list of peers that were found in the IRC channel. Note that just because a peer appears in the list does not mean it is accepting connections.

IrcDiscovery ( string channel, string server = "irc.lfnet.org", int port = 6667 ) : System

Finds a list of peers by connecting to an IRC network, joining a channel, decoding the nicks and then disconnecting.

Protected Methods

Method Description
OnIrcReceive ( string message ) : void
OnIrcSend ( string message ) : void

Private Methods

Method Description
CheckLineStatus ( string statusCode, string response ) : bool
LogAndSend ( TextWriter writer, string command ) : void
ParseUserList ( IEnumerable userNames ) : IList

Method Details

GetPeers() public method

Returns a list of peers that were found in the IRC channel. Note that just because a peer appears in the list does not mean it is accepting connections.
public GetPeers ( ) : IEnumerable
return IEnumerable

IrcDiscovery() public method

Finds a list of peers by connecting to an IRC network, joining a channel, decoding the nicks and then disconnecting.
public IrcDiscovery ( string channel, string server = "irc.lfnet.org", int port = 6667 ) : System
channel string The IRC channel to join, either "#bitcoin" or "#bitcoinTEST" for the production and test networks respectively.
server string Name or textual IP address of the IRC server to join.
port int The port of the IRC server to join.
return System

OnIrcReceive() protected method

protected OnIrcReceive ( string message ) : void
message string
return void

OnIrcSend() protected method

protected OnIrcSend ( string message ) : void
message string
return void