#import <GSConnectionManager.h>
List of all members.
Detailed Description
This protocol defines connection manager functionality. Note: all NSArrays returned by this protocol's methods hold objects of type id<GSConnection>.
Definition at line 10 of file GSConnectionManager.h.
Member Function Documentation
- (id<GSConnection>) addConnectionForUser: |
|
(NSString *) |
user |
server: |
|
(NSString *) |
server |
transport: |
|
(NSString *) |
transport |
|
|
| |
Adds a new connection
- Parameters:
-
user | the user id |
server | the server address |
transport | the transport protocol (valid values are 'tcp' or 'udp') |
- Returns:
- a newly created connection object or nil if the operation is not successful.
- (NSArray*) allConnections |
|
|
|
- Returns:
- a snapshot of current connections
- (NSArray*) connectionsForUser: |
|
(NSString *) |
user |
toServer: |
|
(NSString *) |
server |
|
|
| |
Utility method to retrieve a snapshot of current connections for the specified user id and server.
- Parameters:
-
user | the user id for the connection |
server | the server address |
- Returns:
- a list of all connections matching the specified criteria
- (NSArray*) connectionsForUser: |
|
(NSString *) |
user |
toServer: |
|
(NSString *) |
server |
withTransport: |
|
(NSString *) |
transport |
|
|
| |
Utility method to retrieve a snapshot of current connections for the specified user id, server and transport. Note that passing 'nil' for any parameter is acceptable and means that the parameter will be excluded from the condition. For instance: [myInstance connectionsForUser:"user1" toServer:@"server1" withTransport:nil] will return either tcp or udp connections to the specified server for the specified user.
- Parameters:
-
user | the user id for the connection |
server | the server address |
transport | the transport protocol |
- Returns:
- a list of all connections matching the specified criteria
- (NSArray*) connectionsToServer: |
|
(NSString *) |
server |
|
Utility method to retrieve a snapshot of current connections to the specified server.
- Parameters:
-
- Returns:
- a list of all connections to the specified server
- (NSArray*) connectionsToServer: |
|
(NSString *) |
server |
withTransport: |
|
(NSString *) |
transport |
|
|
| |
Utility method to retrieve a snapshot of current connections with the specified transport to the given server.
- Parameters:
-
server | the server address |
transport | the transport protocol |
- Returns:
- a list of all connections matching the specified criteria
Removes (and disables) the specified connection.
- Parameters:
-
connection | the connection to remove (note that the connection object must not be a copy). |
Property Documentation
The documentation for this protocol was generated from the following file: