Created
June 21, 2022 10:59
-
-
Save neuecc/2e1af2861db2169585614c3a2e332b6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// use this | |
public ValueTask ConnectAsync(string host, int port, CancellationToken cancellationToken) | |
public ValueTask<int> ReceiveAsync(Memory<byte> buffer, SocketFlags socketFlags, CancellationToken cancellationToken) | |
public ValueTask<int> SendAsync(ReadOnlyMemory<byte> buffer, SocketFlags socketFlags, CancellationToken cancellationToken)) | |
// don't use this | |
public Task ConnectAsync(string host, int port) | |
public Task<int> ReceiveAsync(ArraySegment<byte> buffer, SocketFlags socketFlags) | |
public Task<int> SendAsync(ArraySegment<byte> buffer, SocketFlags socketFlags) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment