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

◆ ReadCallbackHandler()

void System.Net.Mime.MimePart.ReadCallbackHandler ( IAsyncResult result)
inlinepackage

Definition at line 206 of file MimePart.cs.

207 {
208 MimePartContext mimePartContext = (MimePartContext)result.AsyncState;
209 mimePartContext._bytesLeft = Stream.EndRead(result);
210 if (mimePartContext._bytesLeft > 0)
211 {
212 IAsyncResult asyncResult = mimePartContext._outputStream.BeginWrite(mimePartContext._buffer, 0, mimePartContext._bytesLeft, _writeCallback, mimePartContext);
213 if (asyncResult.CompletedSynchronously)
214 {
216 }
217 }
218 else
219 {
220 Complete(result, null);
221 }
222 }
virtual int EndRead(IAsyncResult asyncResult)
Definition Stream.cs:737
void Complete(IAsyncResult result, Exception e)
Definition MimePart.cs:164
AsyncCallback _writeCallback
Definition MimePart.cs:41
void WriteCallbackHandler(IAsyncResult result)
Definition MimePart.cs:241

References System.Net.Mime.MimePart.MimePartContext._buffer, System.Net.Mime.MimePart.MimePartContext._bytesLeft, System.Net.Mime.MimePart.MimePartContext._outputStream, System.Net.Mime.MimePart._writeCallback, System.asyncResult, System.IAsyncResult.AsyncState, System.IO.Stream.BeginWrite(), System.Net.Mime.MimePart.Complete(), System.IO.Stream.EndRead(), and System.Net.Mime.MimePart.WriteCallbackHandler().

Referenced by System.Net.Mime.MimePart.ContentStreamCallbackHandler(), System.Net.Mime.MimePart.ReadCallback(), and System.Net.Mime.MimePart.WriteCallbackHandler().