< TCPListenerDelegate > Protocol Reference

#import <TCPListener.h>

Inherited by BLIPEchoServer, and BLIPTestListener.

List of all members.


Detailed Description

The delegate messages sent by TCPListener.

All are optional except -listener:didAcceptConnection:.

Public Member Functions

(void) - listener:didAcceptConnection:
 Called after an incoming connection arrives and is opened; the connection is now ready to send and receive data.
(void) - listenerDidOpen:
 Called after the listener successfully opens.
(void) - listener:failedToOpen:
 Called if the listener fails to open due to an error.
(void) - listenerDidClose:
 Called after the listener closes.
(BOOL) - listener:shouldAcceptConnectionFrom:
 Called when an incoming connection request arrives, but before the conncetion is opened; return YES to accept the connection, NO to refuse it.


Member Function Documentation

- (void) listener: (TCPListener *)  listener
didAcceptConnection: (TCPConnection *)  connection 

Called after an incoming connection arrives and is opened; the connection is now ready to send and receive data.

To control whether or not a connection should be accepted, implement the -listener:shouldAcceptConnectionFrom: method. To use a different class than TCPConnection, set the listener's -connectionClass property. (This is the only required delegate method; the others are optional to implement.)

- (void) listenerDidOpen: (TCPListener *)  listener  

Called after the listener successfully opens.

- (void) listener: (TCPListener *)  listener
failedToOpen: (NSError *)  error 

Called if the listener fails to open due to an error.

- (void) listenerDidClose: (TCPListener *)  listener  

Called after the listener closes.

- (BOOL) listener: (TCPListener *)  listener
shouldAcceptConnectionFrom: (IPAddress *)  address 

Called when an incoming connection request arrives, but before the conncetion is opened; return YES to accept the connection, NO to refuse it.

This method can only use criteria like the peer IP address, or the number of currently open connections, to determine whether to accept. If you also want to check the peer's SSL certificate, then return YES from this method, and use the TCPConnection delegate method -connection:authorizeSSLPeer: to examine the certificate.


The documentation for this protocol was generated from the following file:
Generated on Tue May 27 22:56:33 2008 for MYNetwork:MooseyardNetworking by  doxygen 1.5.4