| 46 | } |
| 47 | |
| 48 | bool ipc_client::open(aio_handle* handle, const char* addr, int timeout) |
| 49 | { |
| 50 | acl_assert(sync_stream_ == NULL && async_stream_ == NULL); |
| 51 | |
| 52 | async_stream_ = aio_socket_stream::open(handle, addr, timeout); |
| 53 | if (async_stream_ == NULL) { |
| 54 | return false; |
| 55 | } |
| 56 | addr_ = acl_mystrdup(addr); |
| 57 | |
| 58 | // �������ӳɹ��Ļص������� |
| 59 | async_stream_->add_open_callback(this); |
| 60 | |
| 61 | // ��������ʧ�ܺ�ص������� |
| 62 | async_stream_->add_close_callback(this); |
| 63 | |
| 64 | // �������ӳ�ʱ�Ļص������� |
| 65 | async_stream_->add_timeout_callback(this); |
| 66 | return true; |
| 67 | } |
| 68 | |
| 69 | void ipc_client::open(aio_socket_stream* client) |
| 70 | { |
no test coverage detected