Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1733 | hidnplayr | 1 | |
2 | ; 160 ms timer |
||
3 | ;---------------------- |
||
4 | macro TCP_timer_160ms { |
||
5 | |||
6 | |||
7 | local .exit |
||
8 | |||
9 | |||
10 | .loop: |
||
11 | mov eax, [eax + SOCKET.NextPtr] |
||
12 | or eax, eax |
||
13 | jz .exit |
||
14 | |||
15 | |||
16 | jne .loop |
||
17 | |||
18 | |||
19 | jnz .loop |
||
20 | |||
21 | |||
22 | |||
23 | |||
24 | call TCP_respond_socket |
||
25 | pop eax |
||
26 | |||
27 | |||
28 | |||
29 | |||
30 | |||
31 | |||
32 | |||
33 | |||
34 | |||
35 | ; 640 ms timer |
||
36 | ;---------------------- |
||
37 | macro TCP_timer_640ms { |
||
38 | |||
39 | |||
40 | local .exit |
||
41 | |||
42 | |||
43 | |||
44 | |||
45 | |||
46 | |||
47 | ; timers do not have the chance to wrap because the keepalive timer will kill the socket when it expires |
||
48 | |||
49 | |||
50 | .loop: |
||
51 | mov eax, [eax + SOCKET.NextPtr] |
||
52 | .check_only: |
||
53 | or eax, eax |
||
54 | jz .exit |
||
55 | |||
56 | |||
57 | jne .loop |
||
58 | |||
59 | |||
60 | jne .loop |
||
61 | |||
62 | |||
63 | |||
64 | |||
65 | |||
66 | jz @f |
||
67 | |||
68 | |||
69 | @@: |
||
70 | |||
71 | |||
72 | |||
73 | |||
74 | dec [eax + TCP_SOCKET.timer_retransmission] |
||
75 | jnz .check_more2 |
||
76 | |||
77 | |||
78 | |||
79 | |||
80 | call TCP_output |
||
81 | pop eax |
||
82 | |||
83 | |||
84 | dec [eax + TCP_SOCKET.timer_keepalive] |
||
85 | jnz .check_more3 |
||
86 | |||
87 | |||
88 | |||
89 | |||
90 | jmp .loop |
||
91 | |||
92 | |||
93 | dec [eax + TCP_SOCKET.timer_timed_wait] |
||
94 | jnz .check_more5 |
||
95 | |||
96 | |||
97 | |||
98 | |||
99 | dec [eax + TCP_SOCKET.timer_persist] |
||
100 | jnz .loop |
||
101 | |||
102 | |||
103 | |||
104 | |||
105 | .exit: |
||
106 | |||
107 | |||
108 |