16 #import "OFException.h"
18 #ifndef OF_HAVE_SOCKETS
19 # error No sockets available!
24 OF_ASSUME_NONNULL_BEGIN
46 @property (readonly, nonatomic)
OFString *host;
51 @property (readonly, nonatomic) uint16_t port;
56 @property (readonly, nonatomic) uint8_t packetType;
61 @property (readonly, nonatomic)
id socket;
66 @property (readonly, nonatomic)
int errNo;
68 + (instancetype)exception OF_UNAVAILABLE;
79 + (instancetype)exceptionWithHost: (
OFString *)host
93 + (instancetype)exceptionWithPort: (uint16_t)port
94 packetType: (uint8_t)packetType
98 - (instancetype)init OF_UNAVAILABLE;
109 - (instancetype)initWithHost: (
OFString *)host
123 - (instancetype)initWithPort: (uint16_t)port
124 packetType: (uint8_t)packetType
129 OF_ASSUME_NONNULL_END
An exception indicating that binding a socket failed.
Definition: OFBindFailedException.h:33
The base class for all exceptions in ObjFW.
Definition: OFException.h:147
A class for handling strings.
Definition: OFString.h:132