sP2P NAT Traversal and peer-to-peer networking APIThe Peer type exposes the following members.
Back to Top
Back to Top
Back to Top
Back to Top
Back to Top
Constructors
Name | Description | |
---|---|---|
![]() | Peer |
Initialises new instance of Peer class
|
Methods
Name | Description | |
---|---|---|
![]() | Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | GetBytes |
Serialises object as byte array
|
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetSerializationLength |
Calculates number of bytes needed in array to store serialisation of peer object
|
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | Parse |
Initialises object values form byte array
|
![]() ![]() | ParsePeer( Byte , Int32) |
Creates Peer object from byte array
|
![]() ![]() | ParsePeer( Byte , Int32 , Int32) |
Creates Peer object from byte array
|
![]() | ToString | Returns a String that represents the current Object. (Inherited from Object.) |
![]() | WriteBytes |
Write peer object serialisation to byte array buffer
|
Extension Methods
Name | Description | |
---|---|---|
![]() | WriteLogEntry | Writes new log entry (Defined by Logger.) |
Fields
Name | Description | |
---|---|---|
![]() ![]() | AuthentificatedState |
Constant equal to Peer connected state, immediately after successfully session opening
|
![]() ![]() | DisconnectedState |
Constant equal to Peer disconnected state
|
Properties
Name | Description | |
---|---|---|
![]() | AllProperties | |
![]() | APIVersion |
Gets or sets the API version. Do not set it yourself!
|
![]() | ApplicationUID |
Used to store UID application peer is using
|
![]() | CanTCPAccept |
Get or sets value indicating peer can perform socket::accept
|
![]() | CheckPointEP |
IP end point of peer's checkpoint server
|
![]() | CheckPointUID |
Unique identifier of peer's CheckPoint server
|
![]() | HasNUPnP |
Get or sets value indicating NAT PNP or UPnP presence in NAT device
|
![]() | HostName |
Used to store UTF8 host name of peers machine. Max length is 255
|
![]() | Item |
Custom properties associated with Peer object. Note this: When serialised Object.ToString() is used,
if you store complex object .ToString() usually returns type name. XML serialisation can be useful
for transferring complex objects.
Remarks Examples Peer Peer1 = new Peer(); Peer1["Email"] = "someone@whatever.com"; ... |
![]() | LastActivityTime |
Reserved for managing object to keep track of last activity time of peer
|
![]() | LocalEP |
Peer local end point
|
![]() | NATTravMethodsUsed |
After NAT Traversal operation this property will be set as ordered list of tunnel methdos applyed during process.
Last one will indicate final successful method.
This property is valid only in Peer argument in successfull connect tunnel handler function
|
![]() | NatType |
Gets or sets NAT behaviour type of peer
|
![]() | OS |
Used to store UTF8 operating system name of peers machine. Max length is 255
|
![]() | PublicEP |
Peer's public end point
|
![]() | Socket |
Each managing class can use this property to assign, socket value for it's need. This property can not be serialised
|
![]() | State |
Gets or sets integer (UInt32) value representing status of peer, 0 (Peer.DisconnectedState) is reserved for disconnection, 1 (Peer.AuthentificatedState) is state immediately after CP authentication other values can be used freely in applications
|
![]() | Tag |
Auxiliary property that may be used for various purposes
|
![]() | TunnelSecretData |
Set only when peer object is argument of tunnel open complete handler. It contains secret 32
byte array known only to peers on two tunnel sides. Array is generated by using data exchanged by
Diffie–Hellman key exchange algoritham.
Use of data is not strict. It can be used at will to generate further keys for encryption.
|
![]() | UID |
Unique identifier of peer
|
See Also