Re: How to know data size in UDP?

2009-11-03 Thread 山本和彦
Hello, > If my understating is correct, I cannot use recvFrom since it calls > recvfrom() with FFI. So, I use socketToHandle to translate a socket to > a handle. Sorry. This is my misunderstanding. recvFrom does not stop other threads at least on UNIX. So, my problem is solved. --Kazu _

Re: How to know data size in UDP?

2009-10-29 Thread Brandon S. Allbery KF8NH
On Oct 29, 2009, at 04:31 , Kazu Yamamoto (山本和彦) wrote: Since the handle is associated with UDP, the entire data size should be known when a UDP packet arrived. But I cannot find a way to know data size. (I want a function like hFileSize.) Note that hGetContents blocks. The short answer is: yo

How to know data size in UDP?

2009-10-29 Thread 山本和彦
Hello, I'm trying to implement DNS resolver without any external C libraries for my daemon program which uses DNS lookup. I know the "hsdns" library exists. But since it calls GNU asynchronous DNS resolver library by FFI, all threads of Haskell are blocked on non-threaded RTS. If the threaded R