ObjFW  Diff

Differences From Artifact [bfcab86676]:

To Artifact [736afef818]:


261
262
263
264
265
266
267
268

269
270
271
272
273
274
275
261
262
263
264
265
266
267

268
269
270
271
272
273
274
275







-
+







	int errNo = 0;

	if (_socket != INVALID_SOCKET)
		@throw [OFAlreadyConnectedException exceptionWithSocket: self];

	if (_SOCKS5Host != nil) {
		/* Connect to the SOCKS5 proxy instead */
		host = _SOCKS5Host;
		host = (OFString *)_SOCKS5Host;
		port = _SOCKS5Port;
	}

	results = of_resolve_host(host, port, SOCK_STREAM);

	for (iter = results; *iter != NULL; iter++) {
		of_resolver_result_t *result = *iter;
603
604
605
606
607
608
609
610


611
612
613
614
615
616
617
603
604
605
606
607
608
609

610
611
612
613
614
615
616
617
618







-
+
+








	if (_socket == INVALID_SOCKET)
		@throw [OFNotOpenException exceptionWithObject: self];

	if (_address == NULL)
		@throw [OFInvalidArgumentException exception];

	of_address_to_string_and_port(_address, _addressLength, &ret, NULL);
	of_address_to_string_and_port((struct sockaddr *)_address,
	    _addressLength, &ret, NULL);

	return ret;
}

- (bool)isListening
{
	return _listening;