MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / receiveData

Function receiveData

extra/yassl/src/handshake.cpp:1043–1067  ·  view source on GitHub ↗

process input data

Source from the content-addressed store, hash-verified

1041
1042// process input data
1043int receiveData(SSL& ssl, Data& data, bool peek)
1044{
1045 if (ssl.GetError() == YasslError(SSL_ERROR_WANT_READ))
1046 ssl.SetError(no_error);
1047
1048 ssl.verfiyHandShakeComplete();
1049 if (ssl.GetError()) return -1;
1050
1051 if (!ssl.HasData())
1052 processReply(ssl);
1053
1054 if (peek)
1055 ssl.PeekData(data);
1056 else
1057 ssl.fillData(data);
1058
1059 ssl.useLog().ShowData(data.get_length());
1060 if (ssl.GetError()) return -1;
1061
1062 if (data.get_length() == 0 && ssl.getSocket().WouldBlock()) {
1063 ssl.SetError(YasslError(SSL_ERROR_WANT_READ));
1064 return SSL_WOULD_BLOCK;
1065 }
1066 return data.get_length();
1067}
1068
1069
1070// send server hello

Callers 3

ReadMethod · 0.85
SSL_readFunction · 0.85
SSL_peekFunction · 0.85

Calls 11

YasslErrorEnum · 0.85
processReplyFunction · 0.85
HasDataMethod · 0.80
PeekDataMethod · 0.80
fillDataMethod · 0.80
ShowDataMethod · 0.80
WouldBlockMethod · 0.80
GetErrorMethod · 0.45
SetErrorMethod · 0.45
get_lengthMethod · 0.45

Tested by

no test coverage detected