ObjFW  Diff

Differences From Artifact [dd20905993]:

To Artifact [c2b198d896]:


310
311
312
313
314
315
316


317
318
319
320
321
322
323
324
325
326


327
328
329
330
331
332
333
{
	if (sock == INVALID_SOCKET)
		@throw [OFNotConnectedException newWithClass: isa];

	if (listen(sock, backlog) == -1)
		@throw [OFListenFailedException newWithClass: isa
						     backLog: backlog];


}

- (void)listen
{
	if (sock == INVALID_SOCKET)
		@throw [OFNotConnectedException newWithClass: isa];

	if (listen(sock, 5) == -1)
		@throw [OFListenFailedException newWithClass: isa
						     backLog: 5];


}

- (OFTCPSocket*)accept
{
	OFTCPSocket *newsock;
	struct sockaddr *addr;
	socklen_t addrlen;







>
>










>
>







310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
{
	if (sock == INVALID_SOCKET)
		@throw [OFNotConnectedException newWithClass: isa];

	if (listen(sock, backlog) == -1)
		@throw [OFListenFailedException newWithClass: isa
						     backLog: backlog];

	listening = YES;
}

- (void)listen
{
	if (sock == INVALID_SOCKET)
		@throw [OFNotConnectedException newWithClass: isa];

	if (listen(sock, 5) == -1)
		@throw [OFListenFailedException newWithClass: isa
						     backLog: 5];

	listening = YES;
}

- (OFTCPSocket*)accept
{
	OFTCPSocket *newsock;
	struct sockaddr *addr;
	socklen_t addrlen;
411
412
413
414
415
416
417


418
419
420
421
422
423
424
- (void)close
{
	if (sock == INVALID_SOCKET)
		@throw [OFNotConnectedException newWithClass: isa];

	close(sock);
	sock = INVALID_SOCKET;



	[self freeMemory: sockAddr];
	sockAddr = NULL;
	sockAddrLen = 0;
}

- (void)dealloc







>
>







415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
- (void)close
{
	if (sock == INVALID_SOCKET)
		@throw [OFNotConnectedException newWithClass: isa];

	close(sock);
	sock = INVALID_SOCKET;
	listening = NO;
	eos = NO;

	[self freeMemory: sockAddr];
	sockAddr = NULL;
	sockAddrLen = 0;
}

- (void)dealloc