MCPcopy Create free account
hub / github.com/davisking/dlib / underflow

Method underflow

dlib/sockstreambuf/sockstreambuf_unbuffered.cpp:53–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51// ----------------------------------------------------------------------------------------
52
53 sockstreambuf_unbuffered::int_type sockstreambuf_unbuffered::
54 underflow(
55 )
56 {
57 if (lastread_next)
58 {
59 return lastread;
60 }
61 else if (peek != EOF)
62 {
63 return peek;
64 }
65 else
66 {
67 char temp;
68 if (con.read(&temp,1) != 1)
69 {
70 // some error occurred
71 return EOF;
72 }
73 peek = static_cast<unsigned char>(temp);
74 return peek;
75 }
76 }
77
78// ----------------------------------------------------------------------------------------
79

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected