File tree Expand file tree Collapse file tree
native/native.tests/testData/codegen/cinterop/objc Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // TARGET_BACKEND: NATIVE
2+ // WITH_PLATFORM_LIBS
3+ // DISABLE_NATIVE: isAppleTarget=false
4+
5+ // KT-85508
6+ // DISABLE_NATIVE: isAppleTarget=true
7+ @file:OptIn(kotlinx.cinterop.ExperimentalForeignApi ::class )
8+
9+ import platform.Network.NW_PARAMETERS_DISABLE_PROTOCOL
10+ import platform.Network.nw_parameters_copy
11+ import platform.Network.nw_parameters_create_secure_tcp
12+ import platform.Network.nw_tcp_options_set_enable_keepalive
13+
14+ fun box (): String {
15+ // See KT-85508.
16+ val params = nw_parameters_create_secure_tcp(
17+ NW_PARAMETERS_DISABLE_PROTOCOL
18+ ) { tcpOptions ->
19+ nw_tcp_options_set_enable_keepalive(tcpOptions, true )
20+ }
21+
22+ val paramsCopy = nw_parameters_copy(params) // Just a use site.
23+ return if (paramsCopy != null ) " OK" else " FAIL: $params "
24+ }
You can’t perform that action at this time.
0 commit comments