Delphi-Cross-Socket
Delphi-Cross-Socket copied to clipboard
CrossHttpConsole demo fails
Hi, I am exploring your library as it really seems to be faster than other solutions as an http backend base. First of all, congratulations!
I tried to run CrossHttpConsole demo but I got this error (calling http://localhost:8000/hello )
Windows 10 (Version 10.0, Build 17763, 64-bit Edition) CrossHttpServer(SSL) start at port:8000, IO threads:5 Press enter stop SSL_do_handshake error error:00000001:lib(0):func(0):reason(1) TIocpCrossSocket._NewReadZero.WSARecv : System Error. Code: 10038(2736), Tentativo di operazione su un elemento diverso dal socket ket CrossSocket._NewReadZero.WSARecv : System Error. Code: 10038(2736), Tentconn count:0
I managed to have a response by undefining the CROSS_SSL define in the project options, though, if I stress out a bit the server (even just running ab.exe -n 1000 http://localhost:8000/hello ) I get some errors in the CrossHttpConsole console window:
Windows 10 (Version 10.0, Build 17763, 64-bit Edition) CrossHttpServer start at port:8000, IO threads:5 Press enter stop conn count:1 TIocpCrossSocket._NewReadZero.WSARecv : System Error. Code: 10058(274A), Socket chiuso nella direzione specificata da una precedente chiamata di arresto. Richiesta di invio o ricezione dati annullata TIocpCrossSocket._NewReadZero.WSARecv : System Error. Code: 10058(274A), Socket chiuso nella direzione specificata da una precedente chiamata di arresto. Richiesta di invio o ricezione dati annullata conn count:2 TIocpCrossSocket._NewReadZero.WSARecv : System Error. Code: 10058(274A), Socket chiuso nella direzione specificata da una precedente chiamata di arresto. Richiesta di invio o ricezione dati annullata dente chiamata di arresto. Richiesta di invio o ricezione dati annullata Socket chiuso nella direzione specificata da una preceTIocpCrossSocket._NewReadZero.WSARecv : System Error. Code: 10058(274A), Socket chiuso nella direzione specificata da una precedente chiamata di arresto. Richiesta di invio o ricezione dati annullata TIocpCrossSocket._NewReadZero.WSARecv : System Error. Code: 10058(274A), Socket chiuso nella direzione specificata da una precedente chiamata di arresto. Richiesta di invio o ricezione dati annullata TIocpCrossSocket._NewReadZero.WSARecv : System Error. Code: 10058(274A), Socket chiuso nella direzione specificata da una precedente chiamata di arresto. Richiesta di invio o ricezione dati annullata TIocpCrossSocket._NewReadZero.WSARecv : System Error. Code: 10058(274A), Socket chiuso nella direzione specificata da una precedente chiamata di arresto. Richiesta di invio o ricezione dati annullata conn count:1 conn count:2 conn count:1
Errors shown here are in Italian (as it's my locale) but you should be able to lookup the error code for an english version. The first one (10038(2736)) should be something like 'Operation attempt on a non-socket element', the other one (10058(274A)) should be 'Socket closed to the specified direction by a preceding stop call. Operation cancelled.'
Sincerely, Andrea
Both of these errors should occur after the connection is disconnected, which is normal for WSARecv to return an error.
those errors doens't happen with my last version of crosssocket, something of scrambled should be happened in the files changes. Later I'll download the last version and will do a test.