[Rd] Question on non-blocking socket

Ben Engbers Ben@Engber@ @end|ng |rom Be-Log|c@|@n|
Wed Feb 15 01:24:26 CET 2023


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 server and 
requesting the status. Tomas Kalibera put me on the right track by 
drawing my attention to the 'socketSelect' function. I don't know 
exactly the purpose of this function is (the function itself is 
documented, but I can't find any information for which situations this 
function should be called.) but it sufficed to call this function once 
between sending and requesting.

I have two questions.
The first is where I can find R documentation on proper use of 
non-blocking sockets and on the proper use of the socketSelect function?

The second question is more focused on using non-blocking sockets in 
general. Is it allowed to execute a read and a receive command 
immediately after each other or must a short waiting loop be built in.
I'm asking this because I'm running into the same problems in a C++ 
project as I did with RBaseX.

Ben Engbers



More information about the R-devel mailing list