Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReadToFillAsync()

static async ValueTask System.Net.Http.SocksHelper.ReadToFillAsync ( Stream stream,
Memory< byte > buffer,
bool async )
inlinestaticprivate

Definition at line 244 of file SocksHelper.cs.

245 {
246 while (buffer.Length != 0)
247 {
248 int num = ((!async) ? stream.Read(buffer.Span) : (await stream.ReadAsync(buffer).ConfigureAwait(continueOnCapturedContext: false)));
249 int num2 = num;
250 if (num2 == 0)
251 {
253 }
254 Memory<byte> memory = buffer;
255 buffer = memory[num2..];
256 }
257 }
static string net_http_invalid_response_premature_eof
Definition SR.cs:94
Definition SR.cs:7

References System.buffer, System.SR.net_http_invalid_response_premature_eof, and System.stream.

Referenced by System.Net.Http.SocksHelper.EstablishSocks4TunnelAsync(), and System.Net.Http.SocksHelper.EstablishSocks5TunnelAsync().