Differences From Artifact [17c2cc5542]:
- File
src/OFTCPSocket.m
— part of check-in
[ca113e0145]
at
2013-06-13 02:03:13
on branch trunk
— Don't bind to port 0 on the Wii.
Instead, a decreasing variable is used now. This should be safe, as
nothing else should be binding ports while homebrew code is running. The
only problem that could arise is when code manually binds to very high
port numbers.This also solves the problem that getsockname() is not available on the
Wii, as we know the port now anyway.And while we're at it, this also adds struct sockaddr_storage. (user: js, size: 18148) [annotate] [blame] [check-ins using]
To Artifact [b00741c4c9]:
- File src/OFTCPSocket.m — part of check-in [dc17a614e8] at 2013-06-17 08:54:17 on branch trunk — Replace a few asserts with OF_ENSURE / OBJC_ERROR. (user: js, size: 18130) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
21 22 23 24 25 26 27 | #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> | < < | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif #ifdef HAVE_ARPA_INET_H # include <arpa/inet.h> #endif #ifdef HAVE_NETDB_H |
︙ | ︙ | |||
807 808 809 810 811 812 813 | } @finally { [mutex unlock]; } # endif #endif /* Get rid of a warning, never reached anyway */ | | | 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 | } @finally { [mutex unlock]; } # endif #endif /* Get rid of a warning, never reached anyway */ OF_ENSURE(0); } - (bool)isListening { return _listening; } |
︙ | ︙ |