32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
*
* @brief A class which provides methods to create and use IPX sockets.
*
* Addresses are of type @ref OFSocketAddress. You can use
* @ref OFSocketAddressMakeIPX to create an address or
* @ref OFSocketAddressIPXNetwork to get the IPX network,
* @ref OFSocketAddressIPXNode to get the IPX node and
* @ref OFSocketAddressPort to get the port (sometimes also called
* socket number).
*
* @warning Even though the OFCopying protocol is implemented, it does *not*
* return an independent copy of the socket, but instead retains it.
* This is so that the socket can be used as a key for a dictionary,
* so context can be associated with a socket. Using a socket in more
* than one thread at the same time is not thread-safe, even if copy
|
|
|
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
*
* @brief A class which provides methods to create and use IPX sockets.
*
* Addresses are of type @ref OFSocketAddress. You can use
* @ref OFSocketAddressMakeIPX to create an address or
* @ref OFSocketAddressIPXNetwork to get the IPX network,
* @ref OFSocketAddressIPXNode to get the IPX node and
* @ref OFSocketAddressIPXPort to get the port (sometimes also called
* socket number).
*
* @warning Even though the OFCopying protocol is implemented, it does *not*
* return an independent copy of the socket, but instead retains it.
* This is so that the socket can be used as a key for a dictionary,
* so context can be associated with a socket. Using a socket in more
* than one thread at the same time is not thread-safe, even if copy
|
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
@property OF_NULLABLE_PROPERTY (assign, nonatomic)
id <OFIPXSocketDelegate> delegate;
/**
* @brief Bind the socket to the specified network, node and port with the
* specified packet type.
*
* @param port The port (sometimes called socket number) to bind to. 0 means to
* pick one and return it.
* @param packetType The packet type to use on the socket
* @return The address on which this socket can be reached
*/
- (OFSocketAddress)bindToPort: (uint16_t)port packetType: (uint8_t)packetType;
@end
OF_ASSUME_NONNULL_END
|
>
>
>
|
>
>
|
>
>
>
>
|
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
@property OF_NULLABLE_PROPERTY (assign, nonatomic)
id <OFIPXSocketDelegate> delegate;
/**
* @brief Bind the socket to the specified network, node and port with the
* specified packet type.
*
* @param network The IPX network to bind to. 0 means the current network.
* @param node The IPX network to bind to. An all zero node means the
* computer's node.
* @param port The port (sometimes called socket number) to bind to. 0 means to
* pick one and return via the returned socket address.
* @param packetType The packet type to use on the socket
* @return The address on which this socket can be reached
* @throw OFBindIPXSocketFailedException Binding failed
* @throw OFAlreadyConnectedException The socket is already bound
*/
- (OFSocketAddress)
bindToNetwork: (uint32_t)network
node: (const unsigned char [_Nonnull IPX_NODE_LEN])node
port: (uint16_t)port
packetType: (uint8_t)packetType;
@end
OF_ASSUME_NONNULL_END
|