Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
9711da1c
Unverified
Commit
9711da1c
authored
May 18, 2020
by
Mygod
Committed by
GitHub
May 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up unused code
parent
5e751564
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
10 deletions
+0
-10
core/src/main/java/com/github/shadowsocks/net/DnsResolverCompat.kt
...main/java/com/github/shadowsocks/net/DnsResolverCompat.kt
+0
-10
No files found.
core/src/main/java/com/github/shadowsocks/net/DnsResolverCompat.kt
View file @
9711da1c
...
@@ -26,9 +26,7 @@ import android.net.DnsResolver
...
@@ -26,9 +26,7 @@ import android.net.DnsResolver
import
android.net.Network
import
android.net.Network
import
android.os.Build
import
android.os.Build
import
android.os.CancellationSignal
import
android.os.CancellationSignal
import
android.os.Looper
import
android.system.ErrnoException
import
android.system.ErrnoException
import
android.system.Os
import
com.github.shadowsocks.Core
import
com.github.shadowsocks.Core
import
com.github.shadowsocks.utils.int
import
com.github.shadowsocks.utils.int
import
kotlinx.coroutines.*
import
kotlinx.coroutines.*
...
@@ -78,8 +76,6 @@ sealed class DnsResolverCompat {
...
@@ -78,8 +76,6 @@ sealed class DnsResolverCompat {
@Throws
(
IOException
::
class
)
@Throws
(
IOException
::
class
)
abstract
fun
bindSocket
(
network
:
Network
,
socket
:
FileDescriptor
)
abstract
fun
bindSocket
(
network
:
Network
,
socket
:
FileDescriptor
)
internal
open
suspend
fun
connectUdp
(
fd
:
FileDescriptor
,
address
:
InetAddress
,
port
:
Int
=
0
)
=
Os
.
connect
(
fd
,
address
,
port
)
abstract
suspend
fun
resolve
(
network
:
Network
,
host
:
String
):
Array
<
InetAddress
>
abstract
suspend
fun
resolve
(
network
:
Network
,
host
:
String
):
Array
<
InetAddress
>
abstract
suspend
fun
resolveOnActiveNetwork
(
host
:
String
):
Array
<
InetAddress
>
abstract
suspend
fun
resolveOnActiveNetwork
(
host
:
String
):
Array
<
InetAddress
>
abstract
suspend
fun
resolveRaw
(
network
:
Network
,
query
:
ByteArray
):
ByteArray
abstract
suspend
fun
resolveRaw
(
network
:
Network
,
query
:
ByteArray
):
ByteArray
...
@@ -100,12 +96,6 @@ sealed class DnsResolverCompat {
...
@@ -100,12 +96,6 @@ sealed class DnsResolverCompat {
throw
IOException
(
message
,
ErrnoException
(
message
,
-
err
))
throw
IOException
(
message
,
ErrnoException
(
message
,
-
err
))
}
}
override
suspend
fun
connectUdp
(
fd
:
FileDescriptor
,
address
:
InetAddress
,
port
:
Int
)
{
if
(
Looper
.
getMainLooper
().
thread
==
Thread
.
currentThread
())
withContext
(
Dispatchers
.
IO
)
{
// #2405
super
.
connectUdp
(
fd
,
address
,
port
)
}
else
super
.
connectUdp
(
fd
,
address
,
port
)
}
/**
/**
* This dispatcher is used for noncancellable possibly-forever-blocking operations in network IO.
* This dispatcher is used for noncancellable possibly-forever-blocking operations in network IO.
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment