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

Method aio_socket_stream

lib_acl_cpp/src/stream/aio_socket_stream.cpp:9–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace acl {
8
9aio_socket_stream::aio_socket_stream(aio_handle* handle,
10 ACL_ASTREAM* stream, bool opened /* = false */)
11: aio_stream(handle), aio_istream(handle), aio_ostream(handle)
12, open_callbacks_(NULL)
13{
14 acl_assert(handle);
15 acl_assert(stream);
16
17 if (opened) {
18 status_ |= STATUS_CONN_OPENED;
19 }
20
21 stream_ = stream;
22
23 // ���û���� enable_error ���� handle �������첽������,
24 // ͬʱע��رռ���ʱ�ص�����
25 this->enable_error();
26
27 // ֻ�е������ӳɹ���ſ� hook IO ��д״̬
28 if (opened) {
29 // ע����ص�����
30 this->enable_read();
31
32 // ע��д�ص�����
33 this->enable_write();
34 }
35}
36
37aio_socket_stream::aio_socket_stream(aio_handle* handle, ACL_SOCKET fd)
38: aio_stream(handle), aio_istream(handle), aio_ostream(handle)

Callers

nothing calls this directly

Calls 5

acl_aio_openFunction · 0.85
enable_errorMethod · 0.80
enable_readMethod · 0.80
enable_writeMethod · 0.80
get_handleMethod · 0.45

Tested by

no test coverage detected