ObjFW  Check-in [d39260c358]

Overview
Comment:OFTCPSocket: Use a backlog of SOMAXCONN.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d39260c358b3a9c4120d9c007544b3e66d14429c1ab2f4b7c3767a2ff8266696
User & Date: js on 2012-12-11 12:12:33
Original User & Date: js on 2012-12-11 12:12:34
Other Links: manifest | tags
Context
2012-12-11
12:12
OFTCPSocket: Fix a bug in -[accept]. check-in: baa6951ec0 user: js tags: trunk
12:12
OFTCPSocket: Use a backlog of SOMAXCONN. check-in: d39260c358 user: js tags: trunk
12:12
Make creating OFHTTPRequestResults public. check-in: 020cedb44b user: js tags: trunk
Changes

Modified src/OFTCPSocket.m from [c453a27f56] to [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;