ObjFW  Diff

Differences From Artifact [c453a27f56]:

To Artifact [637568184e]:


602
603
604
605
606
607
608
609
610
611
612

613
614
615
616
617
618
619
620
621
622
623
624
625
602
603
604
605
606
607
608




609






610
611
612
613
614
615
616







-
-
-
-
+
-
-
-
-
-
-







							   backLog: backLog];

	listening = YES;
}

- (void)listen
{
	if (sock == INVALID_SOCKET)
		@throw [OFNotConnectedException exceptionWithClass: [self class]
							    socket: self];

	[self listenWithBackLog: SOMAXCONN];
	if (listen(sock, 5) == -1)
		@throw [OFListenFailedException exceptionWithClass: [self class]
							    socket: self
							   backLog: 5];

	listening = YES;
}

- (OFTCPSocket*)accept
{
	OFTCPSocket *newSocket;
	struct sockaddr_storage *addr;
	socklen_t addrLen;