-
-
Notifications
You must be signed in to change notification settings - Fork 134
/
TPConnectionsManager.h
41 lines (28 loc) · 1007 Bytes
/
TPConnectionsManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// TPConnectionsManager.h
// teleport
//
// Created by JuL on 24/02/06.
// Copyright 2006 abyssoft. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "TPNetworkConnection.h"
@class TPTCPSecureSocket;
@interface TPConnectionsManager : NSObject
{
NSMutableSet * _connections;
NSMutableDictionary * _pendingConnections;
TPTCPSecureSocket * _listenSocket;
id _listenDelegate;
}
+ (TPConnectionsManager*)manager;
- (void)connectToHost:(TPRemoteHost*)host withDelegate:(id)delegate infoDict:(NSDictionary*)infoDict;
- (BOOL)startListeningWithDelegate:(id)delegate onPort:(int*)port;
- (void)stopListening;
- (BOOL)wakeUpHost:(TPRemoteHost*)host;
@end
@interface NSObject (TPConnectionsManager_delegate)
- (void)connectionToServerSucceeded:(TPNetworkConnection*)networkConnection infoDict:(NSDictionary*)infoDict;
- (void)connectionToServerFailed:(TPRemoteHost*)host infoDict:(NSDictionary*)infoDict;
- (void)connectionFromClientAccepted:(TPNetworkConnection*)networkConnection;
@end