mirror of
https://github.com/netchx/netch.git
synced 2026-05-11 23:45:06 +08:00
Update async
This commit is contained in:
@@ -13,14 +13,14 @@ public static class AioDNS
|
||||
return aiodns_dial(name, Encoding.UTF8.GetBytes(value));
|
||||
}
|
||||
|
||||
public static async Task<bool> InitAsync()
|
||||
public static Task<bool> InitAsync()
|
||||
{
|
||||
return await Task.Run(Init).ConfigureAwait(false);
|
||||
return Task.Run(Init);
|
||||
}
|
||||
|
||||
public static async Task FreeAsync()
|
||||
public static Task FreeAsync()
|
||||
{
|
||||
await Task.Run(Free).ConfigureAwait(false);
|
||||
return Task.Run(Free);
|
||||
}
|
||||
|
||||
[DllImport(aiodns_bin, CallingConvention = CallingConvention.Cdecl)]
|
||||
|
||||
@@ -43,14 +43,14 @@ public static class Redirector
|
||||
return aio_dial(name, value);
|
||||
}
|
||||
|
||||
public static async Task<bool> InitAsync()
|
||||
public static Task<bool> InitAsync()
|
||||
{
|
||||
return await Task.Run(aio_init).ConfigureAwait(false);
|
||||
return Task.Run(aio_init);
|
||||
}
|
||||
|
||||
public static async Task<bool> FreeAsync()
|
||||
public static Task<bool> FreeAsync()
|
||||
{
|
||||
return await Task.Run(aio_free).ConfigureAwait(false);
|
||||
return Task.Run(aio_free);
|
||||
}
|
||||
|
||||
private const string Redirector_bin = "Redirector.bin";
|
||||
|
||||
Reference in New Issue
Block a user