27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#include <stringprep.h>
#include <idna.h>
#import <ObjOpenSSL/SSLSocket.h>
#import "XMPPConnection.h"
#import "XMPPSRVEnumerator.h"
#import "XMPPSCRAMAuth.h"
#import "XMPPPLAINAuth.h"
#import "XMPPStanza.h"
#import "XMPPJID.h"
#import "XMPPIQ.h"
#import "XMPPMessage.h"
#import "XMPPPresence.h"
|
|
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#include <stringprep.h>
#include <idna.h>
#import <ObjOpenSSL/SSLSocket.h>
#import "XMPPConnection.h"
#import "XMPPSRVLookup.h"
#import "XMPPSCRAMAuth.h"
#import "XMPPPLAINAuth.h"
#import "XMPPStanza.h"
#import "XMPPJID.h"
#import "XMPPIQ.h"
#import "XMPPMessage.h"
#import "XMPPPresence.h"
|
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
{
return [[password copy] autorelease];
}
- (void)connect
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
XMPPSRVEnumerator *SRVEnumerator =
[XMPPSRVEnumerator enumeratorWithDomain: server];
XMPPSRVEntry *candidate;
[SRVEnumerator lookUpEntries];
while ((candidate = [SRVEnumerator nextObject]) != nil) {
@try {
[sock connectToHost: [candidate target]
onPort: [candidate port]];
break;
} @catch (OFAddressTranslationFailedException *e) {
[e release];
} @catch (OFConnectionFailedException *e) {
|
|
|
<
<
|
|
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
{
return [[password copy] autorelease];
}
- (void)connect
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
XMPPSRVLookup *SRVLookup = [XMPPSRVLookup lookupWithDomain: server];
OFEnumerator *enumerator = [SRVLookup objectEnumerator];
XMPPSRVEntry *candidate;
while ((candidate = [enumerator nextObject]) != nil) {
@try {
[sock connectToHost: [candidate target]
onPort: [candidate port]];
break;
} @catch (OFAddressTranslationFailedException *e) {
[e release];
} @catch (OFConnectionFailedException *e) {
|