Subversion Repositories Kolibri OS

Rev

Rev 4020 | Rev 4025 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4020 Rev 4021
Line 129... Line 129...
129
        timer_flags             dd ?
129
        timer_flags             dd ?
130
        timer_retransmission    dd ? ; rexmt
130
        timer_retransmission    dd ? ; rexmt
131
        timer_persist           dd ?
131
        timer_persist           dd ?
132
        timer_keepalive         dd ? ; keepalive/syn timeout
132
        timer_keepalive         dd ? ; keepalive/syn timeout
133
        timer_timed_wait        dd ? ; also used as 2msl timer
133
        timer_timed_wait        dd ? ; also used as 2msl timer
-
 
134
        timer_connect           dd ?
Line 134... Line 135...
134
 
135
 
Line 135... Line 136...
135
; extra
136
; extra
136
 
137
 
Line 140... Line 141...
140
        seg_next                dd ? ; re-assembly queue
141
        seg_next                dd ? ; re-assembly queue
Line 141... Line 142...
141
 
142
 
142
        temp_bits               db ?
143
        temp_bits               db ?
Line -... Line 144...
-
 
144
                                rb 3 ; align
143
                                rb 3 ; align
145
 
Line 144... Line 146...
144
 
146
 
Line 145... Line 147...
145
ends
147
ends
Line 614... Line 616...
614
        mov     dword[esp+32], -1
616
        mov     dword[esp+32], -1
615
        ret
617
        ret
Line 616... Line 618...
616
 
618
 
617
  .waitforit:
619
  .waitforit:
618
        push    eax
620
        push    eax
619
        stdcall timer_hs, 300, 0, .wake, eax            ; FIXME: make timeout a constant
621
        stdcall timer_hs, 300, 0, .timeout, eax ; FIXME: make timeout a constant
-
 
622
        pop     ebx
-
 
623
        mov     [ebx + TCP_SOCKET.timer_connect], eax
Line 620... Line 624...
620
        pop     eax
624
        mov     eax, ebx
621
 
625
 
622
  .loop:
626
  .loop:
623
        cmp     [eax + SOCKET.errorcode], 0
627
        cmp     [eax + SOCKET.errorcode], 0
624
        jne     .fail
628
        jne     .fail
Line 625... Line 629...
625
        cmp     [eax + TCP_SOCKET.t_state], TCPS_ESTABLISHED
629
        cmp     [eax + TCP_SOCKET.t_state], TCPS_ESTABLISHED
626
        je      .established
630
        je      .established
Line 627... Line 631...
627
 
631
 
628
        call    SOCKET_block
632
        call    SOCKET_block
629
        jmp     .loop
633
        jmp     .loop
630
 
634
 
631
  .wake:
635
  .timeout:
Line 639... Line 643...
639
        mov     [esp+20], eax
643
        mov     [esp+20], eax
640
        mov     dword[esp+32], -1
644
        mov     dword[esp+32], -1
641
        ret
645
        ret
Line 642... Line 646...
642
 
646
 
-
 
647
  .established:
643
  .established:
648
        stdcall cancel_timer_hs, [eax + TCP_SOCKET.timer_connect]
644
        mov     dword[esp+32], 0
649
        mov     dword[esp+32], 0
Line 645... Line 650...
645
        ret
650
        ret