lsquic icon indicating copy to clipboard operation
lsquic copied to clipboard

echo_client does not work on Windows

Open wangweiwei1188 opened this issue 4 years ago • 4 comments

file echo_client.c, line:121 st_h->read_stdin_ev = event_new(prog_eb(st_h->client_ctx->prog), STDIN_FILENO, EV_READ, read_stdin, st_h);

wangweiwei1188 avatar Jan 20 '21 06:01 wangweiwei1188

Thanks for the report -- what's the error? Does it crash?

dtikhonov avatar Jan 20 '21 13:01 dtikhonov

Thanks for the report -- what's the error? Does it crash?

It's quit with the event_base_loop return -1.

wangweiwei1188 avatar Jan 21 '21 06:01 wangweiwei1188

Thanks for the report -- what's the error? Does it crash? winsock's select function only works on sockets, and stdin is not a socket. ref: https://docs.microsoft.com/zh-cn/windows/win32/api/winsock2/nf-winsock2-select?redirectedfrom=MSDN

wangweiwei1188 avatar Jan 22 '21 11:01 wangweiwei1188

Thank you for pointing this out to me. My first impulse is to mark this TODO and stop compiling echo client and server on Windows.

dtikhonov avatar Jan 22 '21 14:01 dtikhonov