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

◆ ContinueCommandPipeline()

Stream System.Net.CommandStream.ContinueCommandPipeline ( )
inlineprotectedinherited

Definition at line 222 of file CommandStream.cs.

223 {
224 bool isAsync = _isAsync;
225 while (_index < _commands.Length)
226 {
227 if (_doSend)
228 {
229 if (_index < 0)
230 {
231 throw new System.Net.InternalException();
232 }
233 byte[] bytes = Encoding.GetBytes(_commands[_index].Command);
234 if (System.Net.NetEventSource.Log.IsEnabled())
235 {
236 string text = _commands[_index].Command.Substring(0, _commands[_index].Command.Length - 2);
237 if (_commands[_index].HasFlag(PipelineEntryFlags.DontLogParameter))
238 {
239 int num = text.IndexOf(' ');
240 if (num != -1)
241 {
242 text = string.Concat(text.AsSpan(0, num), " ********");
243 }
244 }
245 if (System.Net.NetEventSource.Log.IsEnabled())
246 {
247 System.Net.NetEventSource.Info(this, $"Sending command {text}", "ContinueCommandPipeline");
248 }
249 }
250 try
251 {
252 if (isAsync)
253 {
255 }
256 else
257 {
258 Write(bytes, 0, bytes.Length);
259 }
260 }
261 catch (IOException)
262 {
264 throw;
265 }
266 catch
267 {
268 throw;
269 }
270 if (isAsync)
271 {
272 return null;
273 }
274 }
275 Stream stream = null;
277 {
278 return stream;
279 }
280 }
281 lock (this)
282 {
283 Close();
284 }
285 return null;
286 }
virtual void Close()
Definition Stream.cs:644
static readonly AsyncCallback s_writeCallbackDelegate
PipelineEntry[] _commands
bool PostSendCommandProcessing(ref Stream stream)
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
override IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
virtual byte[] GetBytes(char[] chars)
Definition Encoding.cs:781

References System.Net.CommandStream._commands, System.Net.CommandStream._doSend, System.Net.CommandStream._index, System.Net.CommandStream._isAsync, System.Net.NetworkStreamWrapper.BeginWrite(), System.bytes, System.IO.Stream.Close(), System.Net.CommandStream.PipelineEntry.Command, System.Text.Encoding.GetBytes(), System.Net.NetEventSource.Info(), System.Net.NetEventSource.Log, System.Net.CommandStream.MarkAsRecoverableFailure(), System.Net.CommandStream.PostSendCommandProcessing(), System.Net.CommandStream.s_writeCallbackDelegate, System.stream, System.text, and System.IO.Write.

Referenced by System.Net.CommandStream.CheckContinuePipeline(), System.Net.FtpControlStream.PipelineCallback(), System.Net.CommandStream.PostReadCommandProcessing(), System.Net.CommandStream.ReceiveCommandResponseCallback(), System.Net.CommandStream.SubmitRequest(), and System.Net.CommandStream.WriteCallback().