J
Jeff Davis
I am writing an application and my design is for a non blocking tcp
server. I have written non blocking network apps in C before.
I am having trouble digging through the standard library. I have done
this before in C with no problems. Are there some basic wrappers for the
normal C functions and constants? I couldn't even find the F_SETFL
constant to change the socket descriptor to non blocking. The constants
seem to be all over the place (some in Socket, but I also need
File::NONBLOCK, which is named differently than O_NONBLOCK...). When
reading the documentation it's asking for a packed sockaddr to be passed
to connect.
Is this really the simplest, ruby-like way to build a non-blocking
network app? It seems like this is harder and messier than C. It's also
hard to find the constants and functions even if they do exist.
I really like the Ruby language and this would be my first real Ruby
project (of course I'm still in the prototype stage). However, it seems
like even the basic parts of the standard library could either use some
work or some better documentation.
Regards,
Jeff Davis
server. I have written non blocking network apps in C before.
I am having trouble digging through the standard library. I have done
this before in C with no problems. Are there some basic wrappers for the
normal C functions and constants? I couldn't even find the F_SETFL
constant to change the socket descriptor to non blocking. The constants
seem to be all over the place (some in Socket, but I also need
File::NONBLOCK, which is named differently than O_NONBLOCK...). When
reading the documentation it's asking for a packed sockaddr to be passed
to connect.
Is this really the simplest, ruby-like way to build a non-blocking
network app? It seems like this is harder and messier than C. It's also
hard to find the constants and functions even if they do exist.
I really like the Ruby language and this would be my first real Ruby
project (of course I'm still in the prototype stage). However, it seems
like even the basic parts of the standard library could either use some
work or some better documentation.
Regards,
Jeff Davis