TCP/TCPConnection.h
changeset 16 6f608b552b77
parent 8 6f539dd9921c
child 18 3be241de1630
     1.1 --- a/TCP/TCPConnection.h	Thu May 29 16:40:36 2008 -0700
     1.2 +++ b/TCP/TCPConnection.h	Wed Jun 11 14:58:38 2008 -0700
     1.3 @@ -36,17 +36,13 @@
     1.4      TCPReader *_reader;
     1.5      TCPWriter *_writer;
     1.6      NSError *_error;
     1.7 +    NSTimeInterval _openTimeout;
     1.8  }
     1.9  
    1.10  /** Initializes a TCPConnection to the given IP address.
    1.11      Afer configuring settings, you should call -open to begin the connection. */
    1.12  - (id) initToAddress: (IPAddress*)address;
    1.13  
    1.14 -/** Initializes a TCPConnection to the given IP address, binding to a specific outgoing port
    1.15 -    number. (This is usually only necessary when attempting to tunnel through a NAT.) */
    1.16 -- (id) initToAddress: (IPAddress*)address
    1.17 -           localPort: (UInt16)localPort;
    1.18 -
    1.19  /** Initializes a TCPConnection to the given NSNetService's address and port.
    1.20      If the service's address cannot be resolved, nil is returned. */
    1.21  - (id) initToNetService: (NSNetService*)service;
    1.22 @@ -55,6 +51,9 @@
    1.23      You don't usually need to call this; TCPListener does it automatically. */
    1.24  - (id) initIncomingFromSocket: (CFSocketNativeHandle)socket listener: (TCPListener*)listener;
    1.25  
    1.26 +/** Timeout for waiting to open a connection. (Default is zero, meaning the OS default timeout.) */
    1.27 +@property NSTimeInterval openTimeout;
    1.28 +
    1.29  /** The delegate object that will be called when the connection opens, closes or receives messages. */
    1.30  @property (assign) id<TCPConnectionDelegate> delegate;
    1.31