MCPcopy Create free account
hub / github.com/acl-dev/acl / do_run

Function do_run

lib_acl_cpp/samples/ssl/ssl_server3/master_service.cpp:74–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74static bool do_run(acl::socket_stream& conn, acl::sslbase_io*)
75{
76 acl::string* buf =(acl::string*) conn.get_ctx();
77
78 // ������ģʽ��ȡһ�У��÷���������ʽ���� polarssl_io ��ĵײ�
79 // IO ���̱��ϵ�
80 if (!conn.gets_peek(buf, false)) {
81 if (conn.eof()) {
82 printf("peek error\n");
83 return false;
84 } else {
85 return true;
86 }
87 }
88
89 // ����ģʽ��д���ݣ���Ϊ���׽��ֲ�δ����Ϊ������ģʽ������д�Ĺ���
90 // ����������
91 if (conn.write(*buf) == -1) {
92 logger("write error!");
93 return false;
94 }
95
96 buf->clear();
97 return true;
98}
99
100bool master_service::thread_on_read(acl::socket_stream* conn)
101{

Callers 1

thread_on_readMethod · 0.70

Calls 5

gets_peekMethod · 0.80
get_ctxMethod · 0.45
eofMethod · 0.45
writeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…