Advertisement

Who is using select()?

Started by May 07, 2002 11:44 PM
13 comments, last by bishop_pass 22 years, 9 months ago
quote:
Original post by LordKaT
set the timeval in select() to 0 instead of using NULL.

That has nothing to do with making a socket nonblocking.
quote:
Original post by LordKaT
just out of curiosity, why didnt you just ask how to make a socket nonblocking in the first place?)

Because that wasn''t the point of this thread. The point of this thread was to discuss select() with those who are using it. It evolved to where it is currently discussing making sockets nonblocking.

Stevens uses fctnl(). Windows does not have this. Windows has ioctlsocket(), which is Windows'' name for ioctl, which can change socket parameters.

Right now in this thread, I am now trying to determine if ioctlsocket() is what I am looking for.

I certainly am not interested in WSAASyncSelect() and that paradigm.
_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
You wouldn''t use fnctl, but ioctl.
In Windows, that translates to ioctlsocket (because M$ sucks).

ioctlsocket( s, FIONBIO, 1 );

[Questions (STFW) | GDNet Start Here | GDNet Search | Forum FAQ | Google | Asking Smart Questions ]
[Docs (RTFM) | MSDN | SGI''s STL | OpenGL | File formats]
[C++ Must Haves (RTFS) | MinGW | Boost | Loki | FLTK | SDL ]

Stolen from Magmai Kai Holmlor, who held it from Oluseyi, who was inspired by Kylotan...



"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Advertisement
quote:
Original post by Fruny
You wouldn''t use fnctl, but ioctl.
In Windows, that translates to ioctlsocket (because M$ sucks).

ioctlsocket( s, FIONBIO, 1 );

Ok, thanks.

_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
In case you miss it:

unsigned long _true = 1;

ioctlsocket( s ,FIONBIO, &_true);

Dunno why, but winsock 1.1 I think you had to do this (because M$ sucks) ;P .





M$ will 0w3 j00 f3wls!

Hehe. Wasn''t that comment helpful?

Dire Wolf
www.digitalfiends.com
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com

This topic is closed to new replies.

Advertisement