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_events.c

    r2099 r2101  
    2929int TcpRetxTimerOutRegister(Socket* socket, struct TcpEventCtx* ctx) 
    3030{ 
    31         /* 1. Verify socket is TCP */ 
    32         /* 2. Use internal buffer when posting events. Have general TCP state structure */ 
     31        struct TcpSocket* tcpSock = TcpInfo(socket); 
     32        ctx->ctx.socket = socket; 
    3333 
    34         return 0; 
     34        return SocketAsyncAdd(&tcpSock->retxTimerOut, &ctx->ctx); 
    3535} 
    3636 
    37 int TcpDroppedPktsRegister(Socket* socket, struct TcpEventCtx* ctx, int flags) 
     37int TcpDroppedPktsRegister(Socket* socket, struct TcpEventCtx* ctx) 
    3838{ 
    39         /* 1. Verify socket is TCP */ 
    40         /* 2. flags could be CHECKSUM, DUP, etc. */ 
    41         return 0; 
     39        struct TcpSocket* tcpSock = TcpInfo(socket); 
     40        ctx->ctx.socket = socket; 
     41 
     42        return SocketAsyncAdd(&tcpSock->droppedPkts, &ctx->ctx); 
    4243} 
    4344 
    4445int TcpLocalWinRegister(Socket* socket, struct TcpEventCtx* ctx) 
    4546{ 
    46         return 0; 
     47        struct TcpSocket* tcpSock = TcpInfo(socket); 
     48        ctx->ctx.socket = socket; 
     49 
     50        return SocketAsyncAdd(&tcpSock->localWinChanged, &ctx->ctx); 
    4751} 
    4852 
     
    5458        return SocketAsyncAdd(&tcpSock->remWinChanged, &ctx->ctx); 
    5559} 
    56  
    57 int TcpStateUpdateRegister(Socket* socket, struct TcpEventCtx* ctx, int seconds) 
    58 { 
    59         return 0; 
    60 } 
    61  
    62 int TcpSetTransfer(Socket* socket, int length, int blockSize) 
    63 { 
    64         return 0; 
    65 }