MCPcopy Create free account
hub / github.com/Tencent/phxsql / GetMysqlBufDebugString

Function GetMysqlBufDebugString

phxsqlproxy/phxsqlproxyutil.cpp:142–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142void GetMysqlBufDebugString(const char * buf, int len, std::string & debug_str) {
143 debug_str = "";
144 for (int i = 0; i < len; ++i) {
145 char debug_buf[16] = { 0 };
146 snprintf(debug_buf, sizeof(debug_buf), "(%u,0x%X)", (unsigned int) ((unsigned char) buf[i]), buf[i]);
147 debug_str = debug_str + " " + string(debug_buf);
148 }
149}
150
151int SockAddrToIPPort(struct sockaddr * addr, std::string & ip, int & port) {
152 if (addr->sa_family == AF_INET) {

Callers 1

WriteToDestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected