ObjFW
OFSCTPSocket.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
3  *
4  * All rights reserved.
5  *
6  * This file is part of ObjFW. It may be distributed under the terms of the
7  * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
8  * the packaging of this file.
9  *
10  * Alternatively, it may be distributed under the terms of the GNU General
11  * Public License, either version 2 or 3, which can be found in the file
12  * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
13  * file.
14  */
15 
17 #import "OFRunLoop.h"
18 
19 OF_ASSUME_NONNULL_BEGIN
20 
23 @class OFSCTPSocket;
24 @class OFString;
25 
26 #ifdef OF_HAVE_BLOCKS
33 typedef void (^of_sctp_socket_async_connect_block_t)(id _Nullable exception);
34 #endif
35 
42 @optional
52 - (void)socket: (OFSCTPSocket *)socket
53  didConnectToHost: (OFString *)host
54  port: (uint16_t)port
55  exception: (nullable id)exception;
56 @end
57 
68 {
69  OF_RESERVE_IVARS(OFSCTPSocket, 4)
70 }
71 
76 @property (nonatomic) bool canDelaySendingPackets;
77 
84 @property OF_NULLABLE_PROPERTY (assign, nonatomic)
86 
93 - (void)connectToHost: (OFString *)host port: (uint16_t)port;
94 
101 - (void)asyncConnectToHost: (OFString *)host port: (uint16_t)port;
102 
110 - (void)asyncConnectToHost: (OFString *)host
111  port: (uint16_t)port
112  runLoopMode: (of_run_loop_mode_t)runLoopMode;
113 
114 #ifdef OF_HAVE_BLOCKS
122 - (void)asyncConnectToHost: (OFString *)host
123  port: (uint16_t)port
125 
134 - (void)asyncConnectToHost: (OFString *)host
135  port: (uint16_t)port
136  runLoopMode: (of_run_loop_mode_t)runLoopMode
138 #endif
139 
149 - (uint16_t)bindToHost: (OFString *)host port: (uint16_t)port;
150 @end
151 
152 OF_ASSUME_NONNULL_END
void(^ of_sctp_socket_async_connect_block_t)(id _Nullable exception)
A block which is called when the socket connected.
Definition: OFSCTPSocket.h:33
struct objc_object * id
A pointer to any object.
Definition: ObjFWRT.h:90
A class for storing constant strings using the @"" literal.
Definition: OFConstantString.h:42
A class which provides methods to create and use SCTP sockets in one-to-one mode.
Definition: OFSCTPSocket.h:68
A base class for sequenced packet sockets.
Definition: OFSequencedPacketSocket.h:130
A class for handling strings.
Definition: OFString.h:132
Definition: OFSCTPSocket.h:41
A delegate for OFSequencedPacketSocket.
Definition: OFSequencedPacketSocket.h:71