- Timestamp:
- 06/16/10 15:11:16 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/netchannel/user/sdk/network/tcp/tcp_events.c
r2099 r2101 29 29 int TcpRetxTimerOutRegister(Socket* socket, struct TcpEventCtx* ctx) 30 30 { 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; 33 33 34 return 0;34 return SocketAsyncAdd(&tcpSock->retxTimerOut, &ctx->ctx); 35 35 } 36 36 37 int TcpDroppedPktsRegister(Socket* socket, struct TcpEventCtx* ctx , int flags)37 int TcpDroppedPktsRegister(Socket* socket, struct TcpEventCtx* ctx) 38 38 { 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); 42 43 } 43 44 44 45 int TcpLocalWinRegister(Socket* socket, struct TcpEventCtx* ctx) 45 46 { 46 return 0; 47 struct TcpSocket* tcpSock = TcpInfo(socket); 48 ctx->ctx.socket = socket; 49 50 return SocketAsyncAdd(&tcpSock->localWinChanged, &ctx->ctx); 47 51 } 48 52 … … 54 58 return SocketAsyncAdd(&tcpSock->remWinChanged, &ctx->ctx); 55 59 } 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 }
