Polling poging 2
This commit is contained in:
parent
5c3ddab657
commit
21ede42d8d
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ int main(){
|
||||||
FD_SET(infile, &pollset);//add stdin to polling set
|
FD_SET(infile, &pollset);//add stdin to polling set
|
||||||
select(1, &pollset, 0, 0, &timeout);
|
select(1, &pollset, 0, 0, &timeout);
|
||||||
//only parse input from stdin if available or not yet init'ed
|
//only parse input from stdin if available or not yet init'ed
|
||||||
if ((!ready4data || (snd_cnt - snd_window_at >= snd_window_size)) && poll(cinfd, 1, 500)){parseChunk();fflush(stdout);}
|
if ((!ready4data || (snd_cnt - snd_window_at >= snd_window_size)) && poll(cinfd, 1, (signed int)500)){parseChunk();fflush(stdout);}
|
||||||
if (ready4data){
|
if (ready4data){
|
||||||
if (!inited){
|
if (!inited){
|
||||||
//we are ready, connect the socket!
|
//we are ready, connect the socket!
|
||||||
|
|
Loading…
Add table
Reference in a new issue