#import <IPAddress.h>
Inherits IPAddress.
This is useful when keeping a cache of recent addresses for a peer that doesn't have a stable address.
Public Member Functions | |
| (id) | - initWithIPAddress: |
| Initializes a RecentAddress from an IPAddress. | |
| (BOOL) | - noteSuccess |
| Call this to indicate that the address was successfully used to connect to the desired peer. | |
| (BOOL) | - noteSeen |
| Call this to indicate that you have received evidence that this address is currently being used by this peer. | |
Properties | |
| readonly CFAbsoluteTime | lastSuccess |
| The absolute time that -noteSuccess or -noteSeen was last called. | |
| readonly UInt32 | successes |
| The number of times that -noteSuccess has been called. | |
| - (id) initWithIPAddress: | (IPAddress*) | addr |
Initializes a RecentAddress from an IPAddress.
(You can also initialize RecentAddress using any inherited initializer method.)
| - (BOOL) noteSuccess |
Call this to indicate that the address was successfully used to connect to the desired peer.
Returns YES if the state of the object has changed and it should be re-archived.
| - (BOOL) noteSeen |
Call this to indicate that you have received evidence that this address is currently being used by this peer.
Unlike -noteSuccess it doesn't increment -successes, and only returns YES (to indicate a persistent change) once every 18 hours (to avoid making the client save its cache too often.)
| - (readonly CFAbsoluteTime) lastSuccess |
The absolute time that -noteSuccess or -noteSeen was last called.
| - (readonly UInt32) successes |
The number of times that -noteSuccess has been called.
1.5.4