Subversion Repositories Kolibri OS

Rev

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

Rev 3406 Rev 3459
Line 13... Line 13...
13
;;         GNU GENERAL PUBLIC LICENSE                              ;;
13
;;         GNU GENERAL PUBLIC LICENSE                              ;;
14
;;          Version 2, June 1991                                   ;;
14
;;          Version 2, June 1991                                   ;;
15
;;                                                                 ;;
15
;;                                                                 ;;
16
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 17... Line 17...
17
 
17
 
Line 18... Line 18...
18
$Revision: 3406 $
18
$Revision: 3459 $
Line 19... Line 19...
19
 
19
 
Line 846... Line 846...
846
align 4
846
align 4
847
SOCKET_receive_stream:
847
SOCKET_receive_stream:
Line 848... Line 848...
848
 
848
 
Line -... Line 849...
-
 
849
        DEBUGF  1,"SOCKET_receive: STREAM\n"
849
        DEBUGF  1,"SOCKET_receive: STREAM\n"
850
 
850
 
851
        mov     ebx, edi
851
        mov     ecx, esi
852
        mov     ecx, esi
-
 
853
        mov     edi, edx
-
 
854
        xor     edx, edx
-
 
855
 
852
        mov     edi, edx
856
        test    ebx, MSG_DONTWAIT
853
        xor     edx, edx
857
        jnz     .dontwait
854
  .loop:
858
  .loop:
-
 
859
        cmp     [eax + STREAM_SOCKET.rcv + RING_BUFFER.size], 0
-
 
860
        je      .block
-
 
861
  .dontwait:
-
 
862
        test    ebx, MSG_PEEK
855
        cmp     [eax + STREAM_SOCKET.rcv + RING_BUFFER.size], 0
863
        jnz     .peek
856
        je      .block
864
 
857
        add     eax, STREAM_SOCKET.rcv
865
        add     eax, STREAM_SOCKET.rcv
Line 858... Line 866...
858
        call    SOCKET_ring_read
866
        call    SOCKET_ring_read
859
        call    SOCKET_ring_free
867
        call    SOCKET_ring_free
Line -... Line 868...
-
 
868
 
-
 
869
        mov     [esp+32], ecx                                   ; return number of bytes copied
-
 
870
        ret
-
 
871
 
-
 
872
  .peek:
860
 
873
        mov     ecx, [eax + STREAM_SOCKET.rcv + RING_BUFFER.size]
861
        mov     [esp+32], ecx                                   ; return number of bytes copied
874
        mov     [esp+32], ecx                                   ; return number of bytes available
862
        ret
875
        ret
Line 863... Line 876...
863
 
876