| 228 | } |
| 229 | |
| 230 | void win_aiosocket::init(Vio *vio) |
| 231 | { |
| 232 | m_is_pipe= vio->type == VIO_TYPE_NAMEDPIPE; |
| 233 | m_handle= |
| 234 | m_is_pipe ? vio->hPipe : (HANDLE) mysql_socket_getfd(vio->mysql_socket); |
| 235 | |
| 236 | SetFileCompletionNotificationModes(m_handle, FILE_SKIP_SET_EVENT_ON_HANDLE); |
| 237 | if (vio->type == VIO_TYPE_SSL) |
| 238 | { |
| 239 | /* |
| 240 | TODO : This requires fixing viossl to call our manipulated VIO |
| 241 | */ |
| 242 | return; |
| 243 | } |
| 244 | |
| 245 | if (!(m_buf_ptr = read_buffers.acquire_buffer())) |
| 246 | { |
| 247 | /* Ran out of buffers, that's fine.*/ |
| 248 | return; |
| 249 | } |
| 250 | |
| 251 | vio->tp_ctx= this; |
| 252 | |
| 253 | m_orig_vio_has_data= vio->has_data; |
| 254 | vio->has_data= my_vio_has_data; |
| 255 | |
| 256 | m_orig_vio_read= vio->read; |
| 257 | vio->read= my_vio_read; |
| 258 | } |
| 259 | |
| 260 | void init_win_aio_buffers(unsigned int n_buffers) |
| 261 | { |
nothing calls this directly
no test coverage detected