MCPcopy Create free account
hub / github.com/SmingHub/Sming / read

Method read

Sming/Components/ssl/src/Session.cpp:144–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144int Session::read(InputBuffer& input, uint8_t*& output)
145{
146 if(!connection) {
147 debug_w("SSL: no connection");
148 return -1;
149 }
150 int len = connection->read(input, output);
151 if(len < 0) {
152 debug_w("SSL: Got error: %d (%s)", len, connection->getErrorString(len).c_str());
153 auto alert = connection->getAlert(len);
154 if(alert == Alert::CERTIFICATE_UNKNOWN) {
155 debug_w("SSL: Client didn't like certificate, continue anyway");
156 len = ERR_OK;
157 }
158 }
159
160 return len;
161}
162
163int Session::write(const uint8_t* data, size_t length)
164{

Callers 2

HashContextClass · 0.45
internalOnReceiveMethod · 0.45

Calls 3

c_strMethod · 0.45
getErrorStringMethod · 0.45
getAlertMethod · 0.45

Tested by

no test coverage detected