Vaclav, yes- this is a 'windoze thingy' :-) I'd be happy to look at it, and probably others will be interested in looking at the code. Thank you for a very clean test case!
Bill At 09:22 AM 2/3/2003, Vaclav Ovsik wrote: >Hi, >I have written some very simple test server using apr (src included). > >I met a problem on Windoze NT (among other things): >When the receive timeout occures on a call apr_socket_recv() in the >serving thread, a call to apr_socket_accept() is also interrupted in the >main thread. Next accept on the same socket ends on "socket operation on >non-socket". > >The code output on Windoze NT4.0 (service pack 6) follows. >I simply ran the threadsock.exe and created one connection using the >netcat (from other host) and waited for timeout. > > apr_app_initialize(): done > apr_pool_create(): done > apr_socket_create(): done > apr_sockaddr_info_get(): done > apr_socket_bind(): done > apr_socket_listen(): done > apr_socket_accept(): done > apr_thread_create(): done > apr_socket_accept(): apr_thread_detach(): done > apr_socket_timeout_set(): done > apr_socket_send(): done > - sent 13 bytes > socket recv: apr_socket_recv() failed: Connection timed out > failed: Interrupted system call > apr_socket_accept(): failed: Socket operation on non-socket > >String "failed: Interrupted system call" belongs to preceding >"apr_socket_accept():" of course. :-) > >The listening master socket is probably away. This is apr or windoze >related behavior? (On Linux i386 this works like I expected.) > >Is it possible to write simple server like this (performance doesn't >matter) without need a special code for Win32? > >Excuse my English, please. >Thanks >-- >Zito
