Re: [Rd] Question on non-blocking socket

2023-02-17 Thread Simon Urbanek
Ben, yes, by definition - non-blocking means that reads won't block and always return immediately (the point of non-blocking). The loop below is terrible as it will cause 100% CPU usage while it's spinning. It seems that you want to block so why are you using non-blocking mode? select() effecti

Re: [Rd] Question on non-blocking socket

2023-02-17 Thread Ben Engbers
Hi Tomas, Apparently, inserting some kind of socketSelect() is essential when using non-blocking sockets and a client/erve architecture. That is at least one thing that I have learned ;-). In C++, between sending and requesting, I inserted a call to this function: bool wait(int s) { fd_set

Re: [Rd] Question on non-blocking socket

2023-02-16 Thread Charlie Gao via R-devel
> Date: Wed, 15 Feb 2023 01:24:26 +0100 > From: Ben Engbers > To: r-devel@r-project.org > Subject: [Rd] Question on non-blocking socket > Message-ID: <68ce63b0-7e91-6372-6926-59f3fcfff...@be-logical.nl> > Content-Type: text/plain; charset="utf-8"; Format="fl

Re: [Rd] Question on non-blocking socket

2023-02-15 Thread Tomas Kalibera
On 2/15/23 16:44, Ben Engbers wrote: Hi Op 15-02-2023 om 14:38 schreef Tomas Kalibera: On 2/15/23 01:24, Ben Engbers wrote: Hi, December 27, 2021 I started a thread asking for help troubleshooting non-blocking sockets. .. I have two questions. The first is where I can find R documentati

Re: [Rd] Question on non-blocking socket

2023-02-15 Thread Ben Engbers
Hi Op 15-02-2023 om 14:38 schreef Tomas Kalibera: On 2/15/23 01:24, Ben Engbers wrote: Hi, December 27, 2021 I started a thread asking for help troubleshooting non-blocking sockets. .. I have two questions. The first is where I can find R documentation on proper use of non-blocking socket

Re: [Rd] Question on non-blocking socket

2023-02-15 Thread Ivan Krylov
В Wed, 15 Feb 2023 01:24:26 +0100 Ben Engbers пишет: > where I can find R documentation on proper use of non-blocking > sockets and on the proper use of the socketSelect function? A useful guide to the Berkeley sockets API can be found at . You'll have to translate

Re: [Rd] Question on non-blocking socket

2023-02-15 Thread Tomas Kalibera
On 2/15/23 01:24, Ben Engbers wrote: Hi, December 27, 2021 I started a thread asking for help troubleshooting non-blocking sockets. While developing the RBaseX client, I had issues with the authentication process. It eventually turned out that a short break had to be inserted in this proces

[Rd] Question on non-blocking socket

2023-02-15 Thread Ben Engbers
Hi, December 27, 2021 I started a thread asking for help troubleshooting non-blocking sockets. While developing the RBaseX client, I had issues with the authentication process. It eventually turned out that a short break had to be inserted in this process between sending the credentials to the