Re: Non-blocking udp socket memory leak



ha i found it. its not wince issue. its due to thread lockup issue in my code.
i have a select() call for recvfrom() as i am using non-blocking socket, which blocks the thread.

-g
"Guna" <gunasekaran.ramanujam@xxxxxxxxx> wrote in message news:uIBktZauIHA.2208@xxxxxxxxxxxxxxxxxxxxxxx
hi
when i make udp socket to non-blocking with,
WSAIoctl(s, FIONBIO, &enable, sizeof(enable), NULL, 0, NULL, NULL, NULL)

the connection works fine. but when i close the socket it leaks memory. Looks this issue was a known bug in wince.net4.0
http://download.microsoft.com/download/8/0/5/8057bf64-419e-4836-969c-9d09bfd47c6c/WinCE%20.NET%204.0_Update_Readme_Update_ALL.htm

but i assume this was fixed with later versions. i am using winmobile6 which runs wince5; so it should be fine.

my goal is for non-blocking sendto(..).

any clue?

regards
-g

.



Relevant Pages

  • Re: [6.x] problem with AIO, non-blocking sockets on freebSD and IE7 on windows.
    ... Yes, Blame Microsoft, but we are breaking the TCP spec, not them. ... A TCP socket isn't the same thing as a named pape or FIFO. ... Using non-blocking I/O does not mean one can suddenly shortcut the FINWAIT-1 and FINWAIT-2 states before going into TIME_WAIT, nor the 2 * MSL timeout before the TCP control block is allowed to go away. ... Otherwise, you might end up sending a RST to a dup'ed packet like a stray ACK, which seems to be almost exactly the problem at hand. ...
    (freebsd-net)
  • Trying to learn Non-Blocking sockets on Solaris 8, please help! ready to fork() it.
    ... how to setup a non-blocking socket. ... I've found limited information on ... opening a socket and using the ioctlto set it to non-blocking ... Whats the differance between fcntl and ioctl? ...
    (comp.unix.programmer)
  • Re: java socket i/o with callback/non-blocking
    ... Basically I want to have some subroutine to be called whenever there is data available to read on a socket object without having to poll it. ... Note also that the technique described is blocking, not non-blocking, as indeed is the technique you described even if the channel is in non-blocking mode. ... For just one socket, you are probably much better off to dump all the NIO stuff, and simply use blocking I/O in its own thread. ...
    (comp.lang.java.programmer)
  • Re: [6.x] problem with AIO, non-blocking sockets on freebSD and IE7 on windows.
    ... Yes, Blame Microsoft, but we are breaking the TCP spec, not them. ... A TCP socket isn't the same thing as a named pape or FIFO. ... Using non-blocking I/O does not mean one can suddenly shortcut the FINWAIT-1 and FINWAIT-2 states before going into TIME_WAIT, nor the 2 * MSL timeout before the TCP control block is allowed to go away. ... Otherwise, you might end up sending a RST to a dup'ed packet like a stray ACK, which seems to be almost exactly the problem at hand. ...
    (freebsd-net)
  • Re: [6.x] problem with AIO, non-blocking sockets on freebSD and IE7 on windows.
    ... needs to set eh non-blocking socket option and use kqueue or similar ... This seems to be the correct behaviour. ... non-blocking IO in the manner it was intended. ...
    (freebsd-net)