Show
Ignore:
Timestamp:
06/16/10 15:11:16 (2 years ago)
Author:
mwhitworth
Message:

Add to TCP.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/branches/netchannel/user/sdk/network/tcp/tcp_states.c

    r2099 r2101  
    3434        } 
    3535 
    36         if (states[tcpSock->state] != NULL) 
     36        if (states[tcpSock->state] != NULL /*&& (TcpGetTs() & 1)*/) 
    3737                ret = states[tcpSock->state](tcpSock, header, buffer, length); 
     38 
     39#if 0 
     40        else 
     41                printf("Dropped! (%u, %d)\n", length, tcpSock->state); 
     42#endif 
    3843 
    3944        if (ret == TCP_ERROR) 
     
    6166                ChanRecvBuffFree(tcpSock->channel, buffer); 
    6267 
    63         /* Event handling */ 
     68        /* Event handling and general statistical update */ 
    6469        if (!ret && tcpSock->socket) 
    6570        { 
     
    7075        } 
    7176 
     77        if (tcpSock->remoteWindow < tcpSock->stats.minWin) 
     78                tcpSock->stats.minWin = tcpSock->remoteWindow; 
     79 
     80        if (tcpSock->remoteWindow > tcpSock->stats.maxWin) 
     81                tcpSock->stats.maxWin = tcpSock->remoteWindow; 
     82 
    7283        return 0; 
    7384}