* dtable.cc (dtable::init_std_file_from_handle): Mention that console
handles are kernel objects since Windows 8. * fhandler.h (enum conn_state): Add "listener" state. (class fhandler_socket): Drop listener status flag. (fhandler_socket::lseek): Return -1 and errno ESPIPE. (fhandler_serial::lseek): Ditto. * fhandler_socket.cc (fhandler_socket::listen): Set connect_state to listener. Add comment. (fhandler_socket::accept4): Explicitely check if the socket is listening and fail with EINVAL, if not. Explain why we have to do that. (fhandler_socket::recv_internal): Explicitely check if the socket is connected if it's a stream socket. Explain why we have to do that. (fhandler_socket::getpeereid): Drop now redundant test.
This commit is contained in:
@ -53,7 +53,7 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen)
|
||||
ulen, vmin_, vtime_, io_status.hEvent);
|
||||
if (!overlapped_armed)
|
||||
{
|
||||
SetCommMask (get_handle (), EV_RXCHAR);
|
||||
SetCommMask (get_handle (), EV_RXCHAR| EV_ERR | EV_BREAK | EV_CTS | EV_DSR | EV_RING | EV_RLSD | EV_RXFLAG);
|
||||
ResetEvent (io_status.hEvent);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user