Differences From Artifact [9ad188ca92]:
- File src/OFDatagramSocket.m — part of check-in [f16bccc7b3] at 2024-04-29 21:42:33 on branch trunk — Properly hide private symbols (user: js, size: 10983) [annotate] [blame] [check-ins using] [more...]
To Artifact [009edc504e]:
- File
src/OFDatagramSocket.m
— part of check-in
[7460d2ccd8]
at
2024-08-17 17:30:51
on branch trunk
— Delay socket initialization as long as possible
On game consoles, initializing sockets takes a significant amount of
time. When not delaying socket initializing, that time is spent during
startup even when the application might never use sockets.Worse yet, on Amiga, sockets might not be available at all and the
application will fail to start up, even when the application might never
use sockets. (user: js, size: 10919) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
51 52 53 54 55 56 57 | #if defined(OF_AMIGAOS) && !defined(UNIQUE_ID) # define UNIQUE_ID -1 #endif @implementation OFDatagramSocket @synthesize delegate = _delegate; | < < < < < < < < < < > > > > | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | #if defined(OF_AMIGAOS) && !defined(UNIQUE_ID) # define UNIQUE_ID -1 #endif @implementation OFDatagramSocket @synthesize delegate = _delegate; + (instancetype)socket { return [[[self alloc] init] autorelease]; } - (instancetype)init { self = [super init]; @try { if (self.class == [OFDatagramSocket class]) { [self doesNotRecognizeSelector: _cmd]; abort(); } if (!_OFSocketInit()) @throw [OFInitializationFailedException exceptionWithClass: self.class]; _socket = OFInvalidSocketHandle; #ifdef OF_HAVE_AMIGAOS _socketID = -1; #endif _canBlock = true; } @catch (id e) { [self release]; |
︙ | ︙ |