Experimental blocking sockets

git-svn-id: svn://kolibrios.org@2996 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2012-11-01 19:21:46 +00:00
parent 151ae82c14
commit 2d1db4c224

View File

@ -1027,6 +1027,9 @@ SOCKET_set_opt:
cmp dword [edx+4], SO_BINDTODEVICE cmp dword [edx+4], SO_BINDTODEVICE
je .bind je .bind
cmp dword [edx+4], SO_BLOCK
je .block
jmp s_error jmp s_error
.bind: .bind:
@ -1053,6 +1056,23 @@ SOCKET_set_opt:
mov dword [esp+32], 0 ; success! mov dword [esp+32], 0 ; success!
ret ret
.block:
cmp dword [edx+8], 0
je .unblock
or [eax + SOCKET.options], SO_BLOCK
mov dword [esp+32], 0 ; success!
ret
.unblock:
and [eax + SOCKET.options], not SO_BLOCK
mov dword [esp+32], 0 ; success!
ret
;----------------------------------------------------------------- ;-----------------------------------------------------------------