nonblocking

missing messages when reading with non-blocking udp

I have problem with missing messages when using nonblocking read in udp between two hosts. The sender is on linux and the reader is on winxp. This example in python shows the problem. Here are three scripts used to show the problem. send.py: import socket, sys s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) host = sys.argv[1] s.send...

Ruby TCPSocket: Find out how much data is available

Is there a way to find out how many bytes of data is available on an TCPSocket in Ruby? I.e. how many bytes can be ready without blocking? ...

Why UPDATE blocks SELECT on unrelated rows?

Having the table, defined by script [1], I execute scripts in 2 windows of SSMS --1) first in first SSMS window set transaction isolation level READ UNCOMMITTED; begin transaction; update aaa set Name ='bbb' where id=1; -- results in "(1 row(s) affected)" --rollback and after 1) --2)after launching 1) select * from aaa --de...

Behaviour of recv on a non-blocking TCP socket before connection completion

Friends, I have a non-blocking TCP socket (on AIX). When I attempted connect() I got EINPROGRESS. My question is if I call recv() before connection completion, what would be the (most apprpriate) error code? I saw that, in case connection fails, and I call recv(), I got ECONNREFUSED; means I got an error corresponding to my earlier con...