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

◆ ReadByte()

override int System.Net.Security.SslStream.ReadByte ( )
inlinevirtual

Reimplemented from System.IO.Stream.

Definition at line 749 of file SslStream.cs.

750 {
752 if (Interlocked.Exchange(ref _nestedRead, 1) == 1)
753 {
754 throw new NotSupportedException(System.SR.Format(System.SR.net_io_invalidnestedcall, "ReadByte", "read"));
755 }
756 try
757 {
758 if (_decryptedBytesCount > 0)
759 {
763 return result;
764 }
765 }
766 finally
767 {
768 _nestedRead = 0;
769 }
770 byte[] array = new byte[1];
771 int num = Read(array, 0, 1);
772 if (num != 1)
773 {
774 return -1;
775 }
776 return array[0];
777 }
static string net_io_invalidnestedcall
Definition SR.cs:24
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7
static int Exchange(ref int location1, int value)

References System.Net.Security.SslStream._decryptedBytesCount, System.Net.Security.SslStream._decryptedBytesOffset, System.Net.Security.SslStream._internalBuffer, System.Net.Security.SslStream._nestedRead, System.array, System.Threading.Interlocked.Exchange(), System.SR.Format(), System.SR.net_io_invalidnestedcall, System.IO.Read, System.Net.Security.SslStream.ReturnReadBufferIfEmpty(), and System.Net.Security.SslStream.ThrowIfExceptionalOrNotAuthenticated().