Skip to content

Network tvOS xcode13.0 beta1

Sebastien Pouliot edited this page Jun 7, 2021 · 1 revision

#Network.framework

diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/Network.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/Network.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/Network.h	2021-03-16 13:52:09.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/Network.h	2021-05-22 07:03:58.000000000 -0400
@@ -34,6 +34,7 @@
 #include <Network/path.h>
 #include <Network/privacy_context.h>
 #include <Network/protocol_options.h>
+#include <Network/quic_options.h>
 #include <Network/resolver_config.h>
 #include <Network/tcp_options.h>
 #include <Network/tls_options.h>
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/connection.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/connection.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/connection.h	2021-03-16 13:58:27.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/connection.h	2021-06-02 11:06:10.000000000 -0400
@@ -2,7 +2,7 @@
 //  connection.h
 //  Network
 //
-//  Copyright (c) 2015-2019 Apple Inc. All rights reserved.
+//  Copyright (c) 2015-2019, 2021 Apple Inc. All rights reserved.
 //
 
 #ifndef __NW_CONNECTION_H__
@@ -239,7 +239,9 @@
  * @abstract
  *		Starts the connection, which will cause the connection
  *		to evaluate its path, do resolution, and try to become
- *		readable and writable.
+ *		readable and writable. Once started, a connection
+ *		must be cancelled using nw_connection_cancel() or
+ *		nw_connection_force_cancel() when it is no longer needed.
  *
  * @param connection
  *		The connection object.
@@ -594,6 +596,7 @@
  *		enqueued to be sent.
  */
 API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
+NW_SWIFT_DISABLE_ASYNC
 void
 nw_connection_send(nw_connection_t connection,
 				   _Nullable dispatch_data_t content,
@@ -678,7 +681,7 @@
  *
  * @result
  *		Returns a retained protocol metadata object, or NULL if the connection
- *		has not been established yet, or is cancelled.
+ *		has not been established yet or is cancelled.
  */
 API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
 NW_RETURNS_RETAINED _Nullable nw_protocol_metadata_t
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/connection_group.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/connection_group.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/connection_group.h	2021-03-16 08:47:09.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/connection_group.h	2021-06-02 12:46:44.000000000 -0400
@@ -2,7 +2,7 @@
 //  connection_group.h
 //  Network
 //
-//  Copyright (c) 2019-2020 Apple Inc. All rights reserved.
+//  Copyright (c) 2019-2021 Apple Inc. All rights reserved.
 //
 
 #ifndef __NW_CONNECTION_GROUP_H__
@@ -350,6 +350,57 @@
 										  nw_content_context_t context);
 
 /*!
+ * @function nw_connection_group_copy_protocol_metadata_for_message
+ *
+ * @abstract
+ *		Copy the metadata corresponding to a given inbound connection group message.
+ *
+ * @param group
+ *		The connection group object.
+ *
+ * @param definition
+ *		The protocol definition for which metadata will be returned.
+ *
+ * @result
+ *		Returns a retained protocol metadata object, or NULL if not found.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+_Nullable nw_protocol_metadata_t
+nw_connection_group_copy_protocol_metadata_for_message(nw_connection_group_t group,
+													   nw_content_context_t context,
+													   nw_protocol_definition_t definition);
+
+/*!
+ * @function nw_connection_group_extract_connection_for_message
+ *
+ * @abstract
+ *		Extract a connection corresponding to an inbound message from the
+ *		connection group. Once extracted, subsequent messages from this
+ *		remote endpoint on this connection will no longer be handled by the
+ *		connection group. The connection may be used to read the remainder
+ *		of a partial message or to send a large response with support for partial
+ *		messages and backpressure.
+ *		Any incoming messages from this remote endpoint which were saved from
+ *		the receive handler may no longer be valid after a connection is returned.
+ *
+ * @param group
+ *		The connection group object from which the context was received. If the context was
+ *		not received from this connection group, the extraction will fail.
+ *
+ *	@param context
+ *		A content context representing an inbound message received from this connection group.
+ *
+ * @result
+ *		Returns the connection associated with the provided message, or nil if the extraction
+ *		fails. Extraction will fail if the provided message is not an inbound message from
+ *		this connection group.
+ */
+API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
+NW_RETURNS_RETAINED _Nullable nw_connection_t
+nw_connection_group_extract_connection_for_message(nw_connection_group_t group,
+												   nw_content_context_t context);
+
+/*!
  * @function nw_connection_group_reply
  *
  * @abstract
@@ -385,34 +436,58 @@
 						  dispatch_data_t _Nullable content);
 
 /*!
- * @function nw_connection_group_extract_connection_for_message
+ * @function nw_connection_group_extract_connection
  *
  * @abstract
- *		Extract a connection corresponding to an inbound message from the
- *		connection group. Once extracted, subsequent messages from this
- *		remote endpoint on this connection will no longer be handled by the
- *		connection group. The connection may be used to read the remainder
- *		of a partial message or to send a large response with support for partial
- *		messages and backpressure.
- *		Any incoming messages from this remote endpoint which were saved from
- *		the receive handler may no longer be valid after a connection is returned.
+ *      Extract a connection from the connection group. For a multiplex connection group, this means that
+ *      a new stream is opened and the corresponding nw_connection_t object is returned. For non-multiplex
+ *      connection groups, a connection to the specified endpoint will be returned if allowed by the group descriptor.
+ *
+ *      The connection can be re-inserted into the group later. Once reinserted, the connection group
+ *      will handle subsequent messages from this remote endpoint.
  *
  * @param group
- *		The connection group object from which the context was received. If the context was
- *		not received from this connection group, the extraction will fail.
+ *      The connection group object from which to extract a connection.
  *
- *	@param context
- *		A content context representing an inbound message received from this connection group.
+ * @param endpoint
+ *      The endpoint to use as the remote endpoint for the extracted connection, if applicable.
+ *      For connection groups with multiplex group descriptors, this should be nil.
+ *
+ * @param protocol_options
+ *      The protocol options to apply to the extracted connection. May be nil if not applicable.
  *
  * @result
- *		Returns the connection associated with the provided message, or nil if the extraction
- *		fails. Extraction will fail if the provided message is not an inbound message from
- *		this connection group.
+ *      Returns the connection from the connection group.
  */
-API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
 NW_RETURNS_RETAINED _Nullable nw_connection_t
-nw_connection_group_extract_connection_for_message(nw_connection_group_t group,
-												   nw_content_context_t context);
+nw_connection_group_extract_connection(nw_connection_group_t group,
+									   _Nullable nw_endpoint_t endpoint,
+									   _Nullable nw_protocol_options_t protocol_options);
+
+/*!
+ * @function nw_connection_group_reinsert_extracted_connection
+ *
+ * @abstract
+ *		Reinsert a connection into a connection group. Once reinserted, the connection group
+ *		will handle subsequent messages from this remote endpoint, and any outstanding reads on
+ *		the connection will be cancelled.
+ *
+ * @param group
+ *		The connection group object from which the connection was extracted. If the connection was
+ *		not extracted from this connection group, the reinsertion will fail.
+ *
+ *	@param connection
+ *		A connection that was extracted from this connection group.
+ *
+ * @result
+ *		Returns true if the reinsertion was successful. Reinsertion will fail if the provided connection was
+ *		not extracted from this connection group.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+bool
+nw_connection_group_reinsert_extracted_connection(nw_connection_group_t group,
+												  nw_connection_t connection);
 
 #ifdef __BLOCKS__
 
@@ -474,6 +549,7 @@
  *		enqueued to be sent.
  */
 API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
+NW_SWIFT_DISABLE_ASYNC
 void
 nw_connection_group_send_message(nw_connection_group_t group,
 								 _Nullable dispatch_data_t content,
@@ -481,6 +557,66 @@
 								 nw_content_context_t context,
 								 nw_connection_group_send_completion_t completion);
 
+/*!
+ * @typedef nw_connection_group_new_connection_handler_t
+ *
+ * @abstract
+ *		A block called with a new connection when a multiplex group receives a new stream. If a new connection
+ *		handler is set the user must handle connections received by this handler. There are three possible
+ *		actions to take and one of these three actions must be taken.
+ *		1) Take over the ownership of the connection. In this case, the connection is used by the client to
+ *		   send and receive data as any other connection would be used. The client may insert this
+ *		   connection back into the connection group at a later point if so desired.
+ *      2) If you want the connection group to handle this connection, simply insert this connection back into
+ *         the connection group right away.
+ *      3) If you don't want to accept this connection, simply cancel the connection.
+ *
+ * @param connection
+ *		The connection representing the new stream on this multiplexing protocol
+ */
+typedef void (^nw_connection_group_new_connection_handler_t)(nw_connection_t connection);
+
+/*!
+ * @function nw_connection_group_set_new_connection_handler
+ *
+ * @abstract
+ *		Sets the new connection handler to be invoked whenever a new inbound connection
+ *		is received by the connection group. This function must not be called
+ *		after starting the connection group.
+ *
+ * @param group
+ *		The connection group object.
+ *
+ * @param new_connection_handler
+ *		The new connection handler to call upon receipt of a new inbound connection.
+ *		Pass NULL to remove the handler.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_connection_group_set_new_connection_handler(nw_connection_group_t group,
+											   _Nullable nw_connection_group_new_connection_handler_t new_connection_handler);
+
+/*!
+ * @function nw_connection_group_copy_protocol_metadata
+ *
+ * @abstract
+ *		Copy the metadata corresponding to a given inbound connection group message.
+ *
+ * @param group
+ *		The connection group object.
+ *
+ * @param definition
+ *		The protocol definition for which metadata will be returned.
+ *
+ * @result
+ *		Returns a retained protocol metadata object, or NULL if the connection
+ *		group has not been established yet or is cancelled.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+_Nullable nw_protocol_metadata_t
+nw_connection_group_copy_protocol_metadata(nw_connection_group_t group,
+										   nw_protocol_definition_t definition);
+
 #endif // __BLOCKS__
 
 __END_DECLS
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/connection_report.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/connection_report.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/connection_report.h	2021-03-16 13:58:29.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/connection_report.h	2021-06-02 07:34:00.000000000 -0400
@@ -534,7 +534,8 @@
  *		values across paths where applicable. For values that cannot
  *		sum, the value of the primary path is used.
  */
-NW_EXPORT extern const uint32_t _nw_data_transfer_report_all_paths;
+API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
+extern const uint32_t _nw_data_transfer_report_all_paths;
 #define NW_ALL_PATHS (_nw_data_transfer_report_all_paths)
 
 /*!
@@ -594,8 +595,7 @@
  *
  * @param path_index
  *		The index for the path over which data is transferred.
- *		For non-multipath connections, pass 0 as the path index to access
- *		the single path. Passing NW_ALL_PATHS for this function returns
+ *		Passing NW_ALL_PATHS for this function returns
  *		the sum of all paths.
  *
  * @result
@@ -619,8 +619,7 @@
  *
  * @param path_index
  *		The index for the path over which data is transferred.
- *		For non-multipath connections, pass 0 as the path index to access
- *		the single path. Passing NW_ALL_PATHS for this function returns
+ *		Passing NW_ALL_PATHS for this function returns
  *		the sum of all paths.
  *
  * @result
@@ -644,8 +643,7 @@
  *
  * @param path_index
  *		The index for the path over which data is transferred.
- *		For non-multipath connections, pass 0 as the path index to access
- *		the single path. Passing NW_ALL_PATHS for this function returns
+ *		Passing NW_ALL_PATHS for this function returns
  *		the sum of all paths.
  *
  * @result
@@ -669,8 +667,7 @@
  *
  * @param path_index
  *		The index for the path over which data is transferred.
- *		For non-multipath connections, pass 0 as the path index to access
- *		the single path. Passing NW_ALL_PATHS for this function returns
+ *		Passing NW_ALL_PATHS for this function returns
  *		the sum of all paths.
  *
  * @result
@@ -694,8 +691,7 @@
  *
  * @param path_index
  *		The index for the path over which data is transferred.
- *		For non-multipath connections, pass 0 as the path index to access
- *		the single path. Passing NW_ALL_PATHS for this function returns
+ *		Passing NW_ALL_PATHS for this function returns
  *		the sum of all paths.
  *
  * @result
@@ -719,8 +715,7 @@
  *
  * @param path_index
  *		The index for the path over which data is transferred.
- *		For non-multipath connections, pass 0 as the path index to access
- *		the single path. Passing NW_ALL_PATHS for this function returns
+ *		Passing NW_ALL_PATHS for this function returns
  *		the sum of all paths.
  *
  * @result
@@ -744,8 +739,7 @@
  *
  * @param path_index
  *		The index for the path over which data is transferred.
- *		For non-multipath connections, pass 0 as the path index to access
- *		the single path. Passing NW_ALL_PATHS for this function returns
+ *		Passing NW_ALL_PATHS for this function returns
  *		the sum of all paths.
  *
  * @result
@@ -844,8 +838,7 @@
  *
  * @param path_index
  *		The index for the path over which data is transferred.
- *		For non-multipath connections, pass 0 as the path index to access
- *		the single path. Passing NW_ALL_PATHS for this function returns
+ *		Passing NW_ALL_PATHS for this function returns
  *		the sum of all paths.
  *
  * @result
@@ -869,8 +862,7 @@
  *
  * @param path_index
  *		The index for the path over which data is transferred.
- *		For non-multipath connections, pass 0 as the path index to access
- *		the single path. Passing NW_ALL_PATHS for this function returns
+ *		Passing NW_ALL_PATHS for this function returns
  *		the sum of all paths.
  *
  * @result
@@ -894,8 +886,7 @@
  *
  * @param path_index
  *		The index for the path over which data is transferred.
- *		For non-multipath connections, pass 0 as the path index to access
- *		the single path. Passing NW_ALL_PATHS for this function is
+ *		Passing NW_ALL_PATHS for this function is
  *		equivalent to passing 0.
  *
  * @result
@@ -909,6 +900,31 @@
 nw_data_transfer_report_copy_path_interface(nw_data_transfer_report_t report,
 											uint32_t path_index);
 
+/*!
+ * @function nw_data_transfer_report_get_path_radio_type
+ *
+ * @abstract
+ *		Retrieve the radio type used for data transfer for a given
+ *		path used by a connection.
+ *
+ * @param report
+ *		A data transfer report in the "collected" state.
+ *
+ * @param path_index
+ *		The index for the path over which data is transferred.
+ *		Passing NW_ALL_PATHS for this function is
+ *		equivalent to passing 0.
+ *
+ * @result
+ *		Returns the radio type used for the specified path.
+ *		Returns nw_interface_radio_type_unknown on failure.
+ *		Fails if the report is not yet collected.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+nw_interface_radio_type_t
+nw_data_transfer_report_get_path_radio_type(nw_data_transfer_report_t report,
+											uint32_t path_index);
+
 __END_DECLS
 
 NW_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/content_context.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/content_context.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/content_context.h	2021-03-16 09:53:41.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/content_context.h	2021-06-02 12:43:49.000000000 -0400
@@ -107,7 +107,7 @@
 /*!
  * @function nw_content_context_get_expiration_milliseconds
  * @discussion Retrieve the number of milliseconds after which the content will expire.
- *		See nw_content_context_set_expiration_milliseconds for futher discussion.
+ *		See nw_content_context_set_expiration_milliseconds for further discussion.
  * @param context The context object
  * @result Returns content expiration, or 0 if not set.
  */
@@ -132,7 +132,7 @@
 /*!
  * @function nw_content_context_get_relative_priority
  * @discussion Get the relative priority for the content. See
- *		nw_content_context_set_relative_priority for futher discussion.
+ *		nw_content_context_set_relative_priority for further discussion.
  * @param context The context object
  * @result Returns the relative priority, between 0.0 (lowest priority)
  *		to 1.0 (highest priority). The default value is 0.5.
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h	2021-03-16 05:20:00.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h	2021-06-02 12:43:50.000000000 -0400
@@ -2,7 +2,7 @@
 //  ethernet_channel.h
 //  Network
 //
-//  Copyright (c) 2019 Apple Inc. All rights reserved.
+//  Copyright (c) 2019, 2021 Apple Inc. All rights reserved.
 //
 
 #ifndef __NW_ETHERNET_CHANNEL_H__
@@ -278,6 +278,7 @@
  *		This callback does indicate that the data has been sent.
  */
 API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos)
+NW_SWIFT_DISABLE_ASYNC
 void
 nw_ethernet_channel_send(nw_ethernet_channel_t ethernet_channel,
 						 dispatch_data_t content,
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/framer_options.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/framer_options.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/framer_options.h	2021-03-16 05:20:00.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/framer_options.h	2021-06-02 12:46:45.000000000 -0400
@@ -350,6 +350,13 @@
  *		run, the implementation should call functions like
  *		nw_framer_parse_input() and nw_framer_deliver_input().
  *
+ *		Input events are edge triggered. The input_handler block
+ *		should continue to call nw_framer_parse_input()
+ *		until nw_framer_parse_input() can no longer produce
+ *		enough bytes to satisfy the request, or the protocol
+ *		needs to wait for some other event to continue processing
+ *		later.
+ *
  *		This setter is required, and must only be set from within
  *		the invocation of a nw_framer_start_handler_t.
  *
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h	2021-03-16 08:40:53.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h	2021-06-02 07:34:00.000000000 -0400
@@ -47,7 +47,7 @@
  *		endpoint is not an address endpoint representing a valid multicast
  *		group.
  */
-NW_EXPORT
+API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
 NW_RETURNS_RETAINED nw_group_descriptor_t
 nw_group_descriptor_create_multicast(nw_endpoint_t multicast_group);
 
@@ -66,7 +66,7 @@
  * @result Returns true if the endpoint was added, false if the endpoint was
  * 		not of a valid type and therefore not added.
  */
-NW_EXPORT
+API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
 bool
 nw_group_descriptor_add_endpoint(nw_group_descriptor_t descriptor,
 								 nw_endpoint_t endpoint);
@@ -101,7 +101,7 @@
  *		Returning true from the block will continue to enumerate, and returning false will stop
  *		enumerating.
  */
-NW_EXPORT
+API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
 void
 nw_group_descriptor_enumerate_endpoints(nw_group_descriptor_t descriptor,
 										NW_NOESCAPE nw_group_descriptor_enumerate_endpoints_block_t enumerate_block);
@@ -120,7 +120,7 @@
  * @param source
  *		An endpoint describing the source for this descriptor.
  */
-NW_EXPORT
+API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
 void
 nw_multicast_group_descriptor_set_specific_source(nw_group_descriptor_t multicast_descriptor,
 												  nw_endpoint_t source);
@@ -137,7 +137,7 @@
  * @param disable_unicast_traffic
  *		A boolean indicating if receiving unicast traffic should be disabled.
  */
-NW_EXPORT
+API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
 void
 nw_multicast_group_descriptor_set_disable_unicast_traffic(nw_group_descriptor_t multicast_descriptor,
 														  bool disable_unicast_traffic);
@@ -153,7 +153,7 @@
  *
  * @result A boolean indicating if receiving unicast traffic should be disabled.
  */
-NW_EXPORT
+API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
 bool
 nw_multicast_group_descriptor_get_disable_unicast_traffic(nw_group_descriptor_t multicast_descriptor);
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/interface.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/interface.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/interface.h	2021-03-16 13:56:12.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/interface.h	2021-06-02 12:43:50.000000000 -0400
@@ -75,6 +75,40 @@
 nw_interface_get_type(nw_interface_t interface);
 
 /*!
+ * @typedef nw_interface_radio_type_t
+ * @abstract
+ *		Interface radio types represent the radio technology for a network link.
+ */
+typedef enum {
+	nw_interface_radio_type_unknown = 0,
+	nw_interface_radio_type_wifi_b = 1,
+	nw_interface_radio_type_wifi_a = 2,
+	nw_interface_radio_type_wifi_g = 3,
+	nw_interface_radio_type_wifi_n = 4,
+	nw_interface_radio_type_wifi_ac = 5,
+	nw_interface_radio_type_wifi_ax = 6,
+
+	// 4G LTE
+	nw_interface_radio_type_cell_lte = 0x80,
+	// 5G Dual LTE & New Radio Sub6
+	nw_interface_radio_type_cell_endc_sub6 = 0x81,
+	// 5G Dual LTE & New Radio mmWave
+	nw_interface_radio_type_cell_endc_mmw = 0x82,
+	// 5G Stand Alone New Radio Sub6
+	nw_interface_radio_type_cell_nr_sa_sub6 = 0x83,
+	// 5G Stand Alone New Radio mmWave
+	nw_interface_radio_type_cell_nr_sa_mmw = 0x84,
+	// 3G WCDMA
+	nw_interface_radio_type_cell_wcdma = 0x85,
+	// 2G GSM
+	nw_interface_radio_type_cell_gsm = 0x86,
+	// 1x data
+	nw_interface_radio_type_cell_cdma = 0x87,
+	// HDR data
+	nw_interface_radio_type_cell_evdo = 0x88,
+} nw_interface_radio_type_t;
+
+/*!
  * @function nw_interface_get_name
  *
  * @abstract
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/ip_options.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/ip_options.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/ip_options.h	2021-03-16 05:20:00.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/ip_options.h	2021-06-02 05:37:41.000000000 -0400
@@ -2,7 +2,7 @@
 //  ip_options.h
 //  Network
 //
-//  Copyright (c) 2017-2019 Apple Inc. All rights reserved.
+//  Copyright (c) 2017-2020 Apple Inc. All rights reserved.
 //
 
 #ifndef __NW_IP_OPTIONS_H__
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/listener.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/listener.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/listener.h	2021-03-16 13:56:12.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/listener.h	2021-06-02 11:06:10.000000000 -0400
@@ -13,6 +13,7 @@
 #endif // __NW_INDIRECT__
 
 #include <Network/connection.h>
+#include <Network/connection_group.h>
 #include <Network/advertise_descriptor.h>
 #include <Network/error.h>
 
@@ -208,6 +209,41 @@
 nw_listener_set_new_connection_handler(nw_listener_t listener,
 									   _Nullable nw_listener_new_connection_handler_t handler);
 
+/*!
+ * @typedef nw_listener_new_connection_group_handler_t
+ *
+ * @abstract
+ *		The block called to notify the client of a new connection group.
+ *
+ * @param connection_group
+ *		The new connection group object. This connection group is not yet started. Set the
+ *		event handler and other settings on the connection group before calling start.
+ */
+typedef void (^nw_listener_new_connection_group_handler_t)(nw_connection_group_t connection_group);
+
+/*!
+ * @function nw_listener_set_new_connection_group_handler
+ *
+ * @abstract
+ *		Sets a new connection group handler to be called upon receiving an incoming
+ *		connection that has a multiplexing protocol in its connected protocol stack.
+ *		Must be called before nw_listener_start. Note that this handler is mutually
+ *		exclusive with the new connection handler that is set via
+ *		nw_listener_set_new_connection_handler. Only one of these handlers may
+ *		be set at one time.
+ *
+ * @param listener
+ *		The listener object.
+ *
+ * @param handler
+ *		The event handler to call when the listener receives a new connection group.
+ *		Pass NULL to remove the new connection group handler.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_listener_set_new_connection_group_handler(nw_listener_t listener,
+											 _Nullable nw_listener_new_connection_group_handler_t handler);
+
 #endif // __BLOCKS__
 
 /*!
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/nw_object.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/nw_object.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/nw_object.h	2021-03-16 13:58:29.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/nw_object.h	2021-06-02 11:06:11.000000000 -0400
@@ -2,7 +2,7 @@
 //  nw_object.h
 //  Network
 //
-//  Copyright (c) 2016-2020 Apple Inc. All rights reserved.
+//  Copyright (c) 2016-2021 Apple Inc. All rights reserved.
 //
 
 #ifndef __NW_OBJECT_H__
@@ -27,10 +27,13 @@
 
 #if OS_OBJECT_USE_OBJC
 #  define NW_OBJECT_DECL(type) OS_OBJECT_DECL(type)
+#  define NW_OBJECT_DECL_SUBCLASS(type, super) OS_OBJECT_DECL_SUBCLASS(type, super)
 #else // OS_OBJECT_USE_OBJC
-#  define NW_OBJECT_DECL(type)				\
-		struct type;						\
+#  define NW_OBJECT_DECL(type)					\
+		struct type;							\
 		typedef	struct type *type##_t
+#  define NW_OBJECT_DECL_SUBCLASS(type, super)	\
+		typedef super##_t type##_t
 #endif // OS_OBJECT_USE_OBJC
 
 
@@ -56,11 +59,17 @@
 #  define NW_RETURNS_RETAINED OS_OBJECT_RETURNS_RETAINED
 #endif // !NW_RETURNS_RETAINED
 
-#if defined(__OBJC__) && __has_feature(attribute_ns_returns_not_retained)
+#if __has_attribute(swift_async)
+#  define NW_SWIFT_DISABLE_ASYNC __attribute__((swift_async(none)))
+#else // __has_attribute(swift_async)
+#  define NW_SWIFT_DISABLE_ASYNC
+#endif // __has_attribute(swift_async)
+
+#if defined(__OBJC__) && OS_OBJECT_USE_OBJC && __has_feature(attribute_ns_returns_not_retained)
 #  define NW_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained))
-#else // __OBJC__ && ns_returns_not_retained
+#else // __OBJC__ && OS_OBJECT_USE_OBJC && ns_returns_not_retained
 #  define NW_RETURNS_NOT_RETAINED
-#endif // __OBJC__ && ns_returns_not_retained
+#endif // __OBJC__ && OS_OBJECT_USE_OBJC && ns_returns_not_retained
 
 #if __has_attribute(noescape)
 #define NW_NOESCAPE __attribute__((__noescape__))
@@ -74,6 +83,12 @@
 #define NW_DIRECT
 #endif // objc_direct
 
+#if __has_attribute(objc_direct_members)
+#define NW_DIRECT_MEMBERS __attribute__((objc_direct_members))
+#else // objc_direct_members
+#define NW_DIRECT_MEMBERS
+#endif // objc_direct_members
+
 #if defined(__OBJC__) && __has_attribute(ns_consumed)
 #  define NW_RELEASES_ARGUMENT __attribute__((__ns_consumed__))
 #else // __OBJC__ && ns_consumed
@@ -101,24 +116,20 @@
 #endif // !NW_UNSAFE_UNRETAINED
 
 #ifndef NW_EXTERNALLY_RETAINED
-#if defined(__OBJC__) && __has_attribute(objc_externally_retained)
+#if defined(__OBJC__) && __has_feature(objc_arc) && __has_attribute(objc_externally_retained)
 #   define NW_EXTERNALLY_RETAINED              __attribute__((objc_externally_retained))
 #   define NW_ASSUME_EXTERNALLY_RETAINED_BEGIN _Pragma("clang attribute NW_ASSUME_EXTERNALLY_RETAINED.push(__attribute__((objc_externally_retained)), apply_to=any(function, block, objc_method))")
 #   define NW_ASSUME_EXTERNALLY_RETAINED_END   _Pragma("clang attribute NW_ASSUME_EXTERNALLY_RETAINED.pop")
-#else // __OBJC__ && objc_externally_retained
+#else // __OBJC__ && objc_arc && objc_externally_retained
 #   define NW_EXTERNALLY_RETAINED
 #   define NW_ASSUME_EXTERNALLY_RETAINED_BEGIN
 #   define NW_ASSUME_EXTERNALLY_RETAINED_END
-#endif // __OBJC__ && objc_externally_retained
+#endif // __OBJC__ && objc_arc && objc_externally_retained
 #endif // !NW_EXTERNALLY_RETAINED
 
-#ifndef NW_EXPORT
-#  define NW_EXPORT __attribute__((visibility("default")))
-#endif // !NW_EXPORT
-
 #ifndef NW_EXPORT_PROJECT
-#  define NW_EXPORT_PROJECT NW_EXPORT
-#endif // !NW_EXPORT
+#  define NW_EXPORT_PROJECT __attribute__((visibility("default")))
+#endif // !NW_EXPORT_PROJECT
 
 #ifndef NW_NOT_i386_MAC
 #  if !TARGET_OS_OSX || !defined(__i386__)
@@ -150,6 +161,24 @@
 
 #endif // !OS_OBJECT_USE_OBJC_RETAIN_RELEASE
 
+#ifndef NW_ENUM
+#if __has_attribute(enum_extensibility)
+#define __NW_ENUM_ATTRIBUTES __attribute__((enum_extensibility(open)))
+#else // __has_attribute(enum_extensibility)
+#define __NW_ENUM_ATTRIBUTES
+#endif // __has_attribute(enum_extensibility)
+
+#define __NW_ENUM_GET_MACRO(_1, _2, NAME, ...) NAME
+#if (defined(__cplusplus) && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!defined(__cplusplus) && __has_feature(objc_fixed_enum))
+#define __NW_NAMED_ENUM(_type, _name)     enum __NW_ENUM_ATTRIBUTES _name : _type _name; enum _name : _type
+#define __NW_ANON_ENUM(_type)             enum __NW_ENUM_ATTRIBUTES : _type
+#else // (defined(__cplusplus) && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!defined(__cplusplus) && __has_feature(objc_fixed_enum))
+#define __NW_NAMED_ENUM(_type, _name) _type _name; enum
+#define __NW_ANON_ENUM(_type) enum
+#endif // (defined(__cplusplus) && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!defined(__cplusplus) && __has_feature(objc_fixed_enum))
+#define NW_ENUM(...) __NW_ENUM_GET_MACRO(__VA_ARGS__, __NW_NAMED_ENUM, __NW_ANON_ENUM, )(__VA_ARGS__)
+#endif // NW_ENUM
+
 
 NW_OBJECT_DECL(nw_object);
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/parameters.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/parameters.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/parameters.h	2021-03-16 08:47:09.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/parameters.h	2021-06-02 05:35:04.000000000 -0400
@@ -2,7 +2,7 @@
 //  parameters.h
 //  Network
 //
-//  Copyright (c) 2014-2020 Apple Inc. All rights reserved.
+//  Copyright (c) 2014-2021 Apple Inc. All rights reserved.
 //
 
 #ifndef __NW_PARAMETERS_H__
@@ -175,6 +175,27 @@
 nw_parameters_create_custom_ip(uint8_t custom_ip_protocol_number,
 							   nw_parameters_configure_protocol_block_t configure_ip);
 
+/*!
+ * @function nw_parameters_create_quic
+ *
+ * @abstract
+ *		Creates a parameters object that is configured for QUIC. The caller must
+ *		pass in a block to configure options.
+ *
+ * @param configure_quic
+ *		A block to configure QUIC. The caller must pass a custom
+ *		block to configure the QUIC options.
+ *
+ * @result
+ *		Returns an allocated nw_parameters_t object on success.
+ *		Callers are responsible for deallocating using nw_release(obj) or [obj release].
+ *		These objects support ARC.
+ *		Returns NULL on failure. Fails due to invalid parameters.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+NW_RETURNS_RETAINED nw_parameters_t
+nw_parameters_create_quic(nw_parameters_configure_protocol_block_t configure_quic);
+
 #endif // __BLOCKS__
 
 /*!
@@ -237,6 +258,53 @@
 nw_parameters_set_privacy_context(nw_parameters_t parameters,
 								  nw_privacy_context_t privacy_context);
 
+/*!
+ * @typedef nw_parameters_attribution_t
+ * @abstract
+ *		Attribution values can be used to indicate who determined the network content being accessed.
+ */
+typedef NW_ENUM(uint8_t, nw_parameters_attribution_t) {
+	/*! @const nw_parameters_attribution_developer Developer chosen content. */
+	nw_parameters_attribution_developer = 1,
+	/*! @const nw_parameters_attribution_user User chosen content. */
+	nw_parameters_attribution_user = 2
+};
+
+/*!
+ * @function nw_parameters_set_attribution
+ *
+ * @abstract
+ *        In order to help differentiate communication with domains requested by the user from those requested by the
+ *        developer, attribution may be used. Attribution defaults to nw_parameters_attribution_developer. Setting
+ *        attribution to nw_parameters_attribution_user indicates that the networking performed using these parameters
+ *        is directed to content specified by the user, not the developer.
+ *
+ * @param parameters
+ *		The parameters to modify.
+ *
+ * @param attribution
+ *		The entity to attribute the network operations to.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_parameters_set_attribution(nw_parameters_t parameters, nw_parameters_attribution_t attribution);
+
+/*!
+ * @function nw_parameters_get_attribution
+ *
+ * @abstract
+ *		Returns the attribution set on the parameters.
+ *
+ * @param parameters
+ *		The parameters to check.
+ *
+ * @result
+ *		Returns the attribution property of the parameters.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+nw_parameters_attribution_t
+nw_parameters_get_attribution(nw_parameters_t parameters);
+
 #pragma mark - Path Selection
 
 /*!
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/quic_options.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/quic_options.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/quic_options.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/quic_options.h	2021-06-02 11:06:11.000000000 -0400
@@ -0,0 +1,790 @@
+//
+//  quic_options.h
+//  Network
+//
+//  Copyright (c) 2020-2021 Apple Inc. All rights reserved.
+//
+
+#ifndef __NW_QUIC_OPTIONS_H__
+#define __NW_QUIC_OPTIONS_H__
+
+#ifndef __NW_INDIRECT__
+#warning "Please include <Network/Network.h> instead of this file directly."
+#endif // __NW_INDIRECT__
+
+#include <Network/protocol_options.h>
+
+#include <Security/Security.h>
+
+
+__BEGIN_DECLS
+
+NW_ASSUME_NONNULL_BEGIN
+
+#pragma mark - QUIC
+
+/*!
+ * @function nw_protocol_copy_quic_definition
+ *
+ * @abstract
+ *		Access the definition of the default system protocol implementation
+ *		of QUIC. This protocol can be used as part of a
+ *		connection's protocol stack as a transport protocol.
+ *
+ * @result
+ *		Returns a retained protocol definition object.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+NW_RETURNS_RETAINED nw_protocol_definition_t
+nw_protocol_copy_quic_definition(void);
+
+/*!
+ * @function nw_quic_create_options
+ *
+ * @abstract
+ *		Create an instance of QUIC protocol options. This object can be added
+ *		to an nw_protocol_stack_t to be used in an nw_connection_t or
+ *		an nw_listener_t.
+ *
+ * @result
+ *		Returns a retained protocol options object.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+NW_RETURNS_RETAINED nw_protocol_options_t
+nw_quic_create_options(void);
+
+/*!
+ * @function nw_protocol_options_is_quic
+ *
+ * @abstract
+ *		Checks whether the given protocol options define a QUIC protocol.
+ *
+ * @result
+ *		Returns true if the protocol options are for QUIC, false otherwise.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+bool
+nw_protocol_options_is_quic(nw_protocol_options_t options);
+
+/*!
+ * @function nw_quic_add_tls_application_protocol
+ *
+ * @abstract
+ *		Adds an Application-Layer Protocol Negotiation (ALPN) value to present in the TLS handshake.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_add_tls_application_protocol(nw_protocol_options_t options, const char *application_protocol);
+
+/*!
+ * @function nw_quic_copy_sec_protocol_options
+ *
+ * @abstract
+ *		Access the sec_protocol_options_t for a given QUIC
+ *		options instance. See <Security/SecProtocolOptions.h> for functions
+ *		to further configure security options.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @result
+ *		Returns a retained sec_protocol_options_t object.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+NW_RETURNS_RETAINED sec_protocol_options_t
+nw_quic_copy_sec_protocol_options(nw_protocol_options_t options);
+
+#pragma mark - QUIC Options
+
+/*!
+ * @function nw_quic_get_stream_is_unidirectional
+ *
+ * @abstract
+ *		Returns whether or not a QUIC stream is unidirectional.
+ *
+ * @param options
+ *		An nw_protocol_options_t for a QUIC stream.
+ *
+ * @result
+ *		True if the stream is unidirectional, false otherwise.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+bool
+nw_quic_get_stream_is_unidirectional(nw_protocol_options_t options);
+
+/*!
+ * @function nw_quic_set_stream_is_unidirectional
+ *
+ * @abstract
+ *		Set whether or not a QUIC stream should be unidirectional.
+ *
+ * @param options
+ *		An nw_protocol_options_t for a QUIC stream.
+ *
+ * @param is_unidirectional
+ *		True if the stream is unidirectional, false otherwise.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_set_stream_is_unidirectional(nw_protocol_options_t options,
+									 bool is_unidirectional);
+
+/*!
+ * @function nw_quic_get_initial_max_data
+ *
+ * @abstract
+ *		Get the initial_max_data transport parameter on a QUIC
+ *		connection.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @result
+ *		The initial_max_data that a client
+ *		is willing to receive on a connection.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint64_t
+nw_quic_get_initial_max_data(nw_protocol_options_t options);
+
+/*!
+ * @function nw_quic_set_initial_max_data
+ *
+ * @abstract
+ *		Set the initial_max_data transport parameter on a QUIC
+ *		connection. Setting this option requires
+ *		initial_max_stream_data_bidirectional_local,
+ *		initial_max_stream_data_bidirectional_remote and
+ *		initial_max_stream_data_unidirectional also to be set.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @param initial_max_data
+ *		The initial_max_data controls how much data, in bytes, a client
+ *		is willing to receive on a connection.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_set_initial_max_data(nw_protocol_options_t options,
+							 uint64_t initial_max_data);
+
+/*!
+ * @function nw_quic_get_max_udp_payload_size
+ *
+ * @abstract
+ *		Get the maximum length of a QUIC packet (UDP payload)
+ *		that the client is willing to receive on a connection, in bytes.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @result
+ *		The max_udp_payload_size value, in bytes.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint16_t
+nw_quic_get_max_udp_payload_size(nw_protocol_options_t options);
+
+/*!
+ * @function nw_quic_set_max_udp_payload_size
+ *
+ * @abstract
+ *		Define the maximum length of a QUIC packet (UDP payload)
+ *		that the client is willing to receive on a connection, in bytes.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @param max_udp_payload_size
+ *		The max_udp_payload_size value, in bytes.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_set_max_udp_payload_size(nw_protocol_options_t options,
+								 uint16_t max_udp_payload_size);
+
+/*!
+ * @function nw_quic_get_idle_timeout
+ *
+ * @abstract
+ *		Get the idle timeout value for the QUIC connection. If no packets are sent or received
+ *		within this timeout, the QUIC connection will be closed.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @result
+ *		The idle_timeout value, in milliseconds.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint32_t
+nw_quic_get_idle_timeout(nw_protocol_options_t options);
+
+/*!
+ * @function nw_quic_set_idle_timeout
+ *
+ * @abstract
+ *		Define an idle timeout value for the QUIC connection. If no packets are sent or received
+ *		within this timeout, the QUIC connection will be closed.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @param idle_timeout
+ *		The idle_timeout value, in milliseconds.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_set_idle_timeout(nw_protocol_options_t options,
+						 uint32_t idle_timeout);
+
+/*!
+ * @function nw_quic_get_initial_max_streams_bidirectional
+ *
+ * @abstract
+ *		Get the initial value of maximum bidirectional streams
+ *		that the peer can initiate on a QUIC connection.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @result
+ *		The initial value for the maximum concurrent bidirectional streams.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint64_t
+nw_quic_get_initial_max_streams_bidirectional(nw_protocol_options_t options);
+
+/*!
+ * @function nw_quic_set_initial_max_streams_bidirectional
+ *
+ * @abstract
+ *		Set the initial value of maximum bidirectional streams
+ *		that the peer can initiate on a QUIC connection.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @param initial_max_streams_bidirectional
+ *		The initial value for the maximum concurrent bidirectional streams.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_set_initial_max_streams_bidirectional(nw_protocol_options_t options,
+											  uint64_t initial_max_streams_bidirectional);
+
+/*!
+ * @function nw_quic_get_initial_max_streams_unidirectional
+ *
+ * @abstract
+ *		Get the initial value of maximum unidirectional streams
+ *		that the peer can initiate on a QUIC connection.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @result
+ *		The initial value for the maximum concurrent unidirectional streams.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint64_t
+nw_quic_get_initial_max_streams_unidirectional(nw_protocol_options_t options);
+
+/*!
+ * @function nw_quic_set_initial_max_streams_unidirectional
+ *
+ * @abstract
+ *		Set the initial value of maximum unidirectional streams
+ *		that the peer can initiate on a QUIC connection.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @param initial_max_streams_unidirectional
+ *		The initial value for the maximum concurrent unidirectional streams.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_set_initial_max_streams_unidirectional(nw_protocol_options_t options,
+											   uint64_t initial_max_streams_unidirectional);
+
+/*!
+ * @function nw_quic_get_initial_max_stream_data_bidirectional_local
+ *
+ * @abstract
+ *		Get the initial_max_stream_data_bidi_local transport parameter
+ *		on a QUIC connection.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @result
+ *		How much data the client is willing to receive on a locally initiated stream.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint64_t
+nw_quic_get_initial_max_stream_data_bidirectional_local(nw_protocol_options_t options);
+
+/*!
+ * @function nw_quic_set_initial_max_stream_data_bidirectional_local
+ *
+ * @abstract
+ *		Set the initial_max_stream_data_bidi_local transport parameter
+ *		on a QUIC connection.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @param initial_max_stream_data_bidirectional_local
+ *		The initial_max_stream_data_bidi_local controls how much data
+ *		the client is willing to receive on a locally initiated stream.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_set_initial_max_stream_data_bidirectional_local(nw_protocol_options_t options,
+														uint64_t initial_max_stream_data_bidirectional_local);
+
+/*!
+ * @function nw_quic_get_initial_max_stream_data_bidirectional_remote
+ *
+ * @abstract
+ *		Get the initial_max_stream_data_bidi_remote transport parameter
+ *		on a QUIC connection.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @result
+ *		How much data the client is willing to receive on a remotely initiated stream.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint64_t
+nw_quic_get_initial_max_stream_data_bidirectional_remote(nw_protocol_options_t options);
+
+/*!
+ * @function nw_quic_set_initial_max_stream_data_bidirectional_remote
+ *
+ * @abstract
+ *		Set the initial_max_stream_data_bidi_remote transport parameter
+ *		on a QUIC connection.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @param initial_max_stream_data_bidirectional_remote
+ *		The initial_max_stream_data_bidi_remote controls how much data
+ *		the client is willing to receive on a remotely initiated stream.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_set_initial_max_stream_data_bidirectional_remote(nw_protocol_options_t options,
+														 uint64_t initial_max_stream_data_bidirectional_remote);
+
+/*!
+ * @function nw_quic_get_initial_max_stream_data_unidirectional
+ *
+ * @abstract
+ *		Get the initial_max_stream_data_uni transport parameter
+ *		on a QUIC connection.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @result
+ *		How much data the client is willing to receive on a unidirectional stream.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint64_t
+nw_quic_get_initial_max_stream_data_unidirectional(nw_protocol_options_t options);
+
+/*!
+ * @function nw_quic_set_initial_max_stream_data_unidirectional
+ *
+ * @abstract
+ *		Set the initial_max_stream_data_uni transport parameter
+ *		on a QUIC connection.
+ *
+ * @param options
+ *		An nw_protocol_options_t for QUIC.
+ *
+ * @param initial_max_stream_data_unidirectional
+ *		The initial_max_stream_data_uni controls how much data
+ *		the client is willing to receive on a unidirectional stream.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_set_initial_max_stream_data_unidirectional(nw_protocol_options_t options,
+												   uint64_t initial_max_stream_data_unidirectional);
+
+#pragma mark - QUIC Metadata
+
+/**
+ * @typedef nw_quic_stream_type_t
+ * @abstract
+ *    Represents the type of a QUIC stream.
+ */
+typedef enum {
+	/*! @const nw_quic_stream_type_unknown 		A QUIC stream whose direction can not be determined. */
+	nw_quic_stream_type_unknown = 0,
+	/*! @const nw_quic_stream_type_bidirectional	A bidirectional QUIC stream. */
+	nw_quic_stream_type_bidirectional = 1,
+	/*! @const nw_quic_stream_type_unidirectional 	An unidirectional QUIC stream. */
+	nw_quic_stream_type_unidirectional = 2,
+} nw_quic_stream_type_t;
+
+/*!
+ * @function nw_protocol_metadata_is_quic
+ *
+ * @abstract
+ *		Checks if a protocol metadata object is compatible with the
+ *		accessors defined in this file for the default system
+ *		implementation of QUIC.
+ *
+ * @result
+ *		Returns true if the metadata is for the default system QUIC,
+ *		false otherwise.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+bool
+nw_protocol_metadata_is_quic(nw_protocol_metadata_t metadata);
+
+/*!
+ * @function nw_quic_copy_sec_protocol_metadata
+ *
+ * @abstract
+ *		Access the sec_protocol_metadata_t for a given QUIC connection
+ *		metadata instance. See <Security/SecProtocolOptions.h> for functions
+ *		to further configure security options.
+ *
+ *		Will be filled out on connected instances of QUIC for metadata
+ *		returned by nw_connection_copy_protocol_metadata.
+ *
+ * @param metadata
+ *		An nw_protocol_metadata_t for QUIC.
+ *
+ * @result
+ *		Returns a retained sec_protocol_metadata_t object.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+NW_RETURNS_RETAINED sec_protocol_metadata_t
+nw_quic_copy_sec_protocol_metadata(nw_protocol_metadata_t metadata);
+
+/*!
+ * @function nw_quic_get_stream_id
+ *
+ * @abstract
+ *		Get the QUIC stream ID.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for a QUIC stream.
+ *
+ * @result
+ *		Returns the QUIC stream id.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint64_t
+nw_quic_get_stream_id(nw_protocol_metadata_t metadata);
+
+/*!
+ * @function nw_quic_stream_get_type
+ *
+ * @abstract
+ *        Describes the type of the QUIC stream.
+ *
+ * @param stream_metadata
+ *        A nw_protocol_metadata_t for a QUIC stream.
+ *
+ * @result
+ *        Returns the type of the QUIC stream, stored in nw_quic_stream_type_t.
+ *        If the type can not be determined, returns nw_quic_stream_type_unknown.
+ */
+API_UNAVAILABLE(macos, ios, watchos, tvos)
+uint8_t
+nw_quic_get_stream_type(nw_protocol_metadata_t stream_metadata);
+
+/*!
+ * @function nw_quic_get_stream_application_error
+ *
+ * @abstract
+ *		Access the Application Error value received from the peer in a stream close
+ *		message.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for a QUIC stream.
+ *
+ * @result
+ *		Returns the Application Error code value received from by the peer,
+ *		or UINT64_MAX if no error has been received.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint64_t
+nw_quic_get_stream_application_error(nw_protocol_metadata_t metadata);
+
+/*!
+ * @function nw_quic_set_stream_application_error
+ *
+ * @abstract
+ *		Set an Application Error value to send to the peer when the stream
+ *		is closed.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for a QUIC stream.
+ *
+ * @param application_error
+ *		An application-specific error code value.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_set_stream_application_error(nw_protocol_metadata_t metadata,
+									 uint64_t application_error);
+
+/*!
+ * @function nw_quic_get_local_max_streams_bidirectional
+ *
+ * @abstract
+ *      Get the most recent value of the maximum number of bidirectional streams that the peer can create.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for QUIC.
+ *
+ * @result
+ *		Returns the most recent value of the peer's max number of bidirectional streams.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint64_t
+nw_quic_get_local_max_streams_bidirectional(nw_protocol_metadata_t metadata);
+
+/*!
+ * @function nw_quic_set_local_max_streams_bidirectional
+ *
+ * @abstract
+ *		Sets the maximum number of bidirectional streams that the peer can create.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for QUIC.
+ *
+ * @param max_streams_bidirectional
+ *		The new number of maximum bidirectional streams.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_set_local_max_streams_bidirectional(nw_protocol_metadata_t metadata,
+											uint64_t max_streams_bidirectional);
+
+/*!
+ * @function nw_quic_get_local_max_streams_unidirectional
+ *
+ * @abstract
+ *      Get the most recent value of the maximum number of unidirectional streams that the peer can create.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for QUIC.
+ *
+ * @result
+ *		Returns the most recent value of the peer's max number of unidirectional streams.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint64_t
+nw_quic_get_local_max_streams_unidirectional(nw_protocol_metadata_t metadata);
+
+/*!
+ * @function nw_quic_set_local_max_streams_unidirectional
+ *
+ * @abstract
+ *		Sets the maximum number of undirectional streams that the peer can create.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for QUIC.
+ *
+ * @param max_streams_unidirectional
+ *		The new number of maximum unidirectional streams.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_set_local_max_streams_unidirectional(nw_protocol_metadata_t metadata,
+											 uint64_t max_streams_unidirectional);
+
+/*!
+ * @function nw_quic_get_remote_max_streams_bidirectional
+ *
+ * @abstract
+ * 	    Get the maximum number of bidirectional streams advertised by peer that an application
+ *  	is allowed to create.
+ *
+ *  	Note that while attempts to create streams above this limit will
+ *  	be blocked until the server increases the limit, these blocked
+ *  	attempts will cause a STREAMS_BLOCKED frame to be sent to the
+ *  	server. This informs the server that the client has more streams
+ *  	it would like to create. As a result, the caller should attempt to
+ *  	create streams over this limit if it desires more streams.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for QUIC.
+ *
+ * @result
+ *		Returns the most recent value of the peer's advertised max number of bidirectional streams.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint64_t
+nw_quic_get_remote_max_streams_bidirectional(nw_protocol_metadata_t metadata);
+
+/*!
+ * @function nw_quic_get_remote_max_streams_unidirectional
+ *
+ * @abstract
+ * 	    Get the maximum number of unidirectional streams advertised by peer that an application
+ *  	is allowed to create.
+ *
+ *  	Note that while attempts to create streams above this limit will
+ *  	be blocked until the server increases the limit, these blocked
+ *  	attempts will cause a STREAMS_BLOCKED frame to be sent to the
+ *  	server. This informs the server that the client has more streams
+ *  	it would like to create. As a result, the caller should attempt to
+ *  	create streams over this limit if it desires more streams.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for QUIC.
+ *
+ * @result
+ *		Returns the most recent value of the peer's advertised max number of unidirectional streams.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint64_t
+nw_quic_get_remote_max_streams_unidirectional(nw_protocol_metadata_t metadata);
+
+/*!
+ * @function nw_quic_get_application_error
+ *
+ * @abstract
+ *		Access the Application Error value received from the peer in a connection close
+ *		message.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for QUIC.
+ *
+ * @result
+ *		Returns the Application Error code value received from by the peer,
+ *		or UINT64_MAX if no	error has been received.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint64_t
+nw_quic_get_application_error(nw_protocol_metadata_t metadata);
+
+/*!
+ * @function nw_quic_get_application_error_reason
+ *
+ * @abstract
+ *		Access the Application Error reason string received from the peer in a connection
+ *		close message.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for QUIC.
+ *
+ * @result
+ *		Returns the Application Error reason received from by the peer,
+ *		or NULL if no error reason has been received.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+const char * _Nullable
+nw_quic_get_application_error_reason(nw_protocol_metadata_t metadata);
+
+/*!
+ * @function nw_quic_set_application_error
+ *
+ * @abstract
+ *		Set the Application Error value to send to the peer in a connection close
+ *		message.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for QUIC.
+ *
+ * @param application_error
+ *		Sets the Application Error code value.
+ *
+ * @param reason
+ *		An optional reason string to associate with the error.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_set_application_error(nw_protocol_metadata_t metadata,
+							  uint64_t application_error,
+							  const char * _Nullable reason);
+
+/*!
+ * @function nw_quic_get_keepalive_interval
+ *
+ * @abstract
+ *		Retrieves the keep-alive interval set on a QUIC connection.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for QUIC.
+ *
+ * @result
+ *		Returns value of the keep-alive interval, in seconds,
+ *		or 0 if the keep-alive timer is disabled.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint16_t
+nw_quic_get_keepalive_interval(nw_protocol_metadata_t metadata);
+
+/*!
+ * @function nw_quic_set_keepalive_interval
+ *
+ * @abstract
+ *		Changes the keep-alive interval for QUIC.
+ *
+ * @discussion
+ * 		QUIC connections are encrypted and operate over the UDP protocol
+ * 		which makes it hard for Network Address	Translators and firewalls
+ * 		to track their state. For this reason, these middleboxes may
+ * 		use short timeouts for QUIC flows. By sending keep-alive packets
+ * 		(QUIC PING frames), the endpoint can maintain
+ * 		state of the flow across the network.
+ * 		Keep-alives should only be enabled while there is an outstanding
+ * 		exchange of information with the remote endpoint that has not yet
+ * 		completed, it is not recommended to enable keep-alive packets on an
+ * 		idle connection that is not expecting to send or receive data in
+ * 		the near future.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for QUIC.
+ *
+ * @param keepalive_interval
+ * 		The keep-alive interval for QUIC, in seconds,
+ * 		or 0 if the keep-alive timer is disabled.
+ * 		Pass `NW_QUIC_CONNECTION_DEFAULT_KEEPALIVE` to use the default
+ * 		keep-alive interval.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_quic_set_keepalive_interval(nw_protocol_metadata_t metadata,
+							   uint16_t keepalive_interval);
+
+#pragma mark - QUIC Metadata Get Only
+
+/*!
+ * @function nw_quic_get_remote_idle_timeout
+ *
+ * @abstract
+ *		Access the idle_timeout value in milliseconds received from the peer
+ *		in the transport parameters.
+ *
+ * @param metadata
+ *		A nw_protocol_metadata_t for QUIC.
+ *
+ * @result
+ *		Returns the idle_timeout value in milliseconds received from the peer.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+uint64_t
+nw_quic_get_remote_idle_timeout(nw_protocol_metadata_t metadata);
+
+NW_ASSUME_NONNULL_END
+
+__END_DECLS
+
+#endif // __NW_QUIC_OPTIONS_H__
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/tcp_options.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/tcp_options.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/tcp_options.h	2021-03-16 13:56:13.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/tcp_options.h	2021-06-02 11:06:12.000000000 -0400
@@ -2,7 +2,7 @@
 //  tcp_options.h
 //  Network
 //
-//  Copyright (c) 2017-2019 Apple Inc. All rights reserved.
+//  Copyright (c) 2017-2020 Apple Inc. All rights reserved.
 //
 
 #ifndef __NW_TCP_OPTIONS_H__
@@ -336,6 +336,38 @@
 nw_tcp_options_set_disable_ecn(nw_protocol_options_t options,
 							   bool disable_ecn);
 
+/*!
+ * @typedef nw_multipath_version_t
+ * @abstract
+ *		Multipath versions represent the MPTCP standard versions
+ */
+typedef enum {
+	/*! @const nw_multipath_version_unspecified MPTCP unspecified version  */
+	nw_multipath_version_unspecified = -1,
+	/*! @const nw_multipath_version_0 MPTCP version 0 */
+	nw_multipath_version_0 = 0,
+	/*! @const nw_multipath_version_1 MPTCP version 1 */
+	nw_multipath_version_1 = 1,
+} nw_multipath_version_t;
+
+/*!
+ * @function nw_tcp_options_set_multipath_force_version
+ *
+ * @abstract
+ *		Configure MPTCP to use a specified MPTCP standard version.
+ *		This ignores the cached value from MPTCP version discovery.
+ *
+ * @param options
+ *		A TCP protocol options object.
+ *
+ * @param multipath_force_version
+ *		The MPTCP version.
+ */
+API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
+void
+nw_tcp_options_set_multipath_force_version(nw_protocol_options_t options,
+										   nw_multipath_version_t multipath_force_version);
+
 #pragma mark - Metadata
 
 /*!
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/tls_options.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/tls_options.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/tls_options.h	2021-03-16 13:56:12.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Network.framework/Headers/tls_options.h	2021-06-02 05:35:04.000000000 -0400
@@ -60,7 +60,7 @@
  * @abstract
  *		Access the sec_protocol_options_t for a given network protocol
  *		options instance. See <Security/SecProtocolOptions.h> for functions
- *		to futher configure security options.
+ *		to further configure security options.
  *
  * @param options
  *		An nw_protocol_options_t that has been created for TLS.
Clone this wiki locally