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

Function do_run

lib_acl_cpp/samples/ssl/ssl_server2/master_service.cpp:83–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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…