@@ -57,31 +57,32 @@ # endif of_udp_socket_address_t _address; id _exception; } -- initWithSourceThread: (OFThread *)sourceThread - host: (OFString *)host - port: (uint16_t)port - target: (id)target - selector: (SEL)selector - context: (id)context; +- (instancetype)initWithSourceThread: (OFThread *)sourceThread + host: (OFString *)host + port: (uint16_t)port + target: (id)target + selector: (SEL)selector + context: (id)context; # ifdef OF_HAVE_BLOCKS -- initWithSourceThread: (OFThread *)sourceThread - host: (OFString *)host - port: (uint16_t)port - block: (of_udp_socket_async_resolve_block_t)block; +- (instancetype)initWithSourceThread: (OFThread *)sourceThread + host: (OFString *)host + port: (uint16_t)port + block: (of_udp_socket_async_resolve_block_t) + block; # endif @end @implementation OFUDPSocket_ResolveThread -- initWithSourceThread: (OFThread *)sourceThread - host: (OFString *)host - port: (uint16_t)port - target: (id)target - selector: (SEL)selector - context: (id)context +- (instancetype)initWithSourceThread: (OFThread *)sourceThread + host: (OFString *)host + port: (uint16_t)port + target: (id)target + selector: (SEL)selector + context: (id)context { self = [super init]; @try { _sourceThread = [sourceThread retain]; @@ -97,14 +98,14 @@ return self; } # ifdef OF_HAVE_BLOCKS -- initWithSourceThread: (OFThread *)sourceThread - host: (OFString *)host - port: (uint16_t)port - block: (of_udp_socket_async_resolve_block_t)block +- (instancetype)initWithSourceThread: (OFThread *)sourceThread + host: (OFString *)host + port: (uint16_t)port + block: (of_udp_socket_async_resolve_block_t)block { self = [super init]; @try { _sourceThread = [sourceThread retain]; @@ -368,11 +369,11 @@ { of_address_to_string_and_port( (struct sockaddr *)&address->address, address->length, host, port); } -- init +- (instancetype)init { self = [super init]; _socket = INVALID_SOCKET; @@ -385,11 +386,11 @@ [self close]; [super dealloc]; } -- copy +- (id)copy { return [self retain]; } - (uint16_t)bindToHost: (OFString *)host