Skip to content

Commit

Permalink
Renames
Browse files Browse the repository at this point in the history
  • Loading branch information
stoyicker committed Apr 2, 2024
1 parent a4af67a commit 783665d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.tidal.networktime.internal

import com.tidal.networktime.internal.network_framework_workaround.nw_connection_send_with_default_context
import com.tidal.networktime.internal.network_framework_workaround.nw_parameters_create_secure_udp_workaround
import com.tidal.networktime.internal.network_framework_workaround.nw_connection_send_default_context
import com.tidal.networktime.internal.network_framework_workaround.nw_parameters_create_secure_udp_disable_protocol
import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.addressOf
import kotlinx.cinterop.convert
Expand Down Expand Up @@ -38,7 +38,7 @@ internal actual class NTPUDPSocketOperations {

actual suspend fun prepare(address: String, portNumber: Int, connectTimeout: Duration) {
println("BEFORE CREATESECUREUDP")
val parameters = nw_parameters_create_secure_udp_workaround()
val parameters = nw_parameters_create_secure_udp_disable_protocol()
println("BEFORE CREATEHOST")
println("Endpoint is $address/$portNumber")
val endpoint = nw_endpoint_create_host(address, portNumber.toString())
Expand Down Expand Up @@ -76,7 +76,7 @@ internal actual class NTPUDPSocketOperations {
)
}
println("BEFORE SEND")
nw_connection_send_with_default_context(
nw_connection_send_default_context(
connection,
data,
true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ language = Objective-C
#import <Network/connection.h>

// https://stackoverflow.com/a/63050804
NW_RETURNS_RETAINED nw_parameters_t nw_parameters_create_secure_udp_workaround() {
NW_RETURNS_RETAINED nw_parameters_t nw_parameters_create_secure_udp_disable_protocol() {
return nw_parameters_create_secure_udp(
NW_PARAMETERS_DISABLE_PROTOCOL,
NW_PARAMETERS_DEFAULT_CONFIGURATION
);
}

// https://youtrack.jetbrains.com/issue/KT-62102/
void nw_connection_send_with_default_context(
void nw_connection_send_default_context(
nw_connection_t connection,
_Nullable dispatch_data_t content,
bool is_complete,
Expand Down

0 comments on commit 783665d

Please sign in to comment.