IPAddress.h
changeset 61 981f9d604c88
parent 49 20cccc7c26ee
     1.1 --- a/IPAddress.h	Sun May 24 15:03:39 2009 -0700
     1.2 +++ b/IPAddress.h	Tue Jul 21 10:04:10 2009 -0700
     1.3 @@ -42,6 +42,9 @@
     1.4  /** Initializes an IPAddress from a BSD struct sockaddr. */
     1.5  - (id) initWithSockAddr: (const struct sockaddr*)sockaddr;
     1.6  
     1.7 +/** Initializes an IPAddress from NSData containing a BSD struct sockaddr. */
     1.8 +- (id) initWithData: (NSData*)data;
     1.9 +
    1.10  /** Returns the IP address of this host (plus the specified port number).
    1.11      If multiple network interfaces are active, the main one's address is returned. */
    1.12  + (IPAddress*) localAddressWithPort: (UInt16)port;
    1.13 @@ -71,6 +74,9 @@
    1.14  /** The port number, or zero if none was specified, in native byte order. */
    1.15  @property (readonly) UInt16 port;
    1.16  
    1.17 +/** The address as an NSData object containing a struct sockaddr. */
    1.18 +@property (readonly) NSData* asData;
    1.19 +
    1.20  /** Is this IP address in a designated private/local address range, such as 10.0.1.X?
    1.21      If so, the address is not globally meaningful outside of the local subnet. */
    1.22  @property (readonly) BOOL isPrivate;            // In a private/local addr range like 10.0.1.X?