 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Eric Bart Guest
|
Posted: Tue May 25, 2004 4:26 pm Post subject: Comment ouvrir un flot d'entrée non bloquant ? |
|
|
Bonjour,
Je cherche l'équivalent de de
int fd = open(AXARFIFO, O_RDONLY|O_NONBLOCK);
J'imagine que cela ne marche pas :
ifstream isReadFifo(AXARFIFO,ios:in |O_NONBLOCK);
Où bien est-ce possible de rendre
getline(flot,string) non bloquant ?
Merci
|
|
| Back to top |
|
 |
Djelal Raouf Guest
|
Posted: Tue May 25, 2004 8:11 pm Post subject: Re: Comment ouvrir un flot d'entrée non bloquant? |
|
|
Eric Bart <eb-adm (AT) eric-bart (DOT) pasdepubmerci.net> a écrit :
| Quote: | Bonjour,
Je cherche l'équivalent de de
int fd = open(AXARFIFO, O_RDONLY|O_NONBLOCK);
J'imagine que cela ne marche pas :
ifstream isReadFifo(AXARFIFO,ios:in |O_NONBLOCK);
Où bien est-ce possible de rendre
getline(flot,string) non bloquant ?
|
Pas en C ni en C++ standard. Si ton système est compatible POSIX,
c'est là qu'il faut chercher (en particulier fcntl).
--
Djelal Raouf
djelal dot raouf at ensta dot org
|
|
| Back to top |
|
 |
Eric Bart Guest
|
Posted: Thu May 27, 2004 9:03 pm Post subject: Re: Comment ouvrir un flot d'entrée non bloquant ? |
|
|
| Quote: | Je cherche l'équivalent de de
int fd = open(AXARFIFO, O_RDONLY|O_NONBLOCK);
J'imagine que cela ne marche pas :
ifstream isReadFifo(AXARFIFO,ios:in |O_NONBLOCK);
Où bien est-ce possible de rendre
getline(flot,string) non bloquant ?
Pas en C ni en C++ standard. Si ton système est compatible POSIX,
c'est là qu'il faut chercher (en particulier fcntl).
|
fcntl demande le file descriptor :
int fcntl (int filedes, int command, ...)
Comment récupérer le file descrpt. d'un stream C++ ?
J'ai pas trouvé !
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|