Nog een poging...
This commit is contained in:
parent
66b8de0a86
commit
667859d984
1 changed files with 4 additions and 1 deletions
|
@ -51,6 +51,8 @@ int main(){
|
||||||
|
|
||||||
//first timestamp set
|
//first timestamp set
|
||||||
firsttime = getNowMS();
|
firsttime = getNowMS();
|
||||||
|
int now = getNowMS();
|
||||||
|
int lastcheck = now;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "Doing handshake...\n");
|
fprintf(stderr, "Doing handshake...\n");
|
||||||
|
@ -85,7 +87,8 @@ int main(){
|
||||||
//only parse input if available or not yet init'ed
|
//only parse input if available or not yet init'ed
|
||||||
//rightnow = getNowMS();
|
//rightnow = getNowMS();
|
||||||
retval = epoll_wait(poller, events, 1, 100);
|
retval = epoll_wait(poller, events, 1, 100);
|
||||||
if (retval > 0){
|
now = getNowMS();
|
||||||
|
if ((retval > 0) || ((now - lastcheck > 1000) && (!ready4data || (snd_cnt - snd_window_at >= snd_window_size)))){
|
||||||
parseChunk();
|
parseChunk();
|
||||||
fflush(CONN);
|
fflush(CONN);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue