The model representing a Gnutella node on the network stored in the cache.
More...
|
| GnutellaNode (string ipAddress, int port) |
| Constructs a new Gnutella Node.
|
|
| GnutellaNode (IPAddress IPAddress, int port) |
| Constructs a new Gnutella Node.
|
|
override string | ToString () |
| Returns the node as ip:port and url encodes it.
|
|
override bool | Equals (object? obj) |
| Two nodes are equal if their ips are the same and their ports are the same.
|
|
override int | GetHashCode () |
| Not relevant since the Equals method doesn't need it.
|
|
|
IPAddress | IPAddress [get, set] |
| The ip adress of the node.
|
|
int | Port [get, set] |
| Listening port of the node.
|
|
TimeSpan | ActiveSince [get, set] |
| When did the webcache get an update about this node.
|
|
The model representing a Gnutella node on the network stored in the cache.
◆ GnutellaNode() [1/2]
GWebCache.Models.GnutellaNode.GnutellaNode |
( |
string | ipAddress, |
|
|
int | port ) |
|
inline |
Constructs a new Gnutella Node.
- Parameters
-
ipAddress | string representation of the IP |
port | Listening port of the node |
- Exceptions
-
ArgumentException | If the ipadress is not valid or the port number is below zero |
◆ GnutellaNode() [2/2]
GWebCache.Models.GnutellaNode.GnutellaNode |
( |
IPAddress | IPAddress, |
|
|
int | port ) |
|
inline |
Constructs a new Gnutella Node.
- Parameters
-
ipAddress | IPaddress of the node |
port | Listening port of the node |
- Exceptions
-
ArgumentException | If the port number is below zero |
◆ Equals()
override bool GWebCache.Models.GnutellaNode.Equals |
( |
object? | obj | ) |
|
|
inline |
Two nodes are equal if their ips are the same and their ports are the same.
- Returns
- An indication if two nodes are equal
◆ GetHashCode()
override int GWebCache.Models.GnutellaNode.GetHashCode |
( |
| ) |
|
|
inline |
Not relevant since the Equals method doesn't need it.
- Exceptions
-
◆ ToString()
override string GWebCache.Models.GnutellaNode.ToString |
( |
| ) |
|
|
inline |
Returns the node as ip:port and url encodes it.
The reason for the url encoding is that we can then immeaditely send it on to the webcache
◆ ActiveSince
TimeSpan GWebCache.Models.GnutellaNode.ActiveSince |
|
getset |
When did the webcache get an update about this node.
This is exclusively provided by V2 webcaches so always check if this is not filled in
The documentation for this class was generated from the following file:
- GWebCache/Models/GnutellaNode.cs