Re: Can't exit app after BeginReceive



There's a thread being started by that call and the thread isn't exiting. I
don't know what would break it out there, but I'd try calling socket.Close()
before anything else. For better control over what's going on, use your own
thread with blocking calls rather than BeginXXX(), which creates the thread
behind your back.

Paul T.


"Mike" <seattlevine@xxxxxxxxx> wrote in message
news:1115674027.910754.300790@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I've seen a bit of traffic in this group about similar problems but am
> not quite sure if this is the same. I have an app that needs to read
> asynchronous data over a socket forever, handling it as it comes in.
> The app needs to continue to perform other tasks based on user input.
>
> So, I create a socket, connect it to my serving app (running on the
> same device) and call BeginRecieve. All is working as expected except
> that when I call Application.Exit(), the application does not exit.
> I've tried calling Shutdown() on the socket, but this did not help.
>
> Thanks,
> Mike
>


.



Relevant Pages

  • Re: Cant exit app after BeginReceive
    ... >> asynchronous data over a socket forever, handling it as it comes in. ... >> The app needs to continue to perform other tasks based on user input. ... >> that when I call Application.Exit(), ...
    (microsoft.public.dotnet.framework.compactframework)
  • Cant exit app after BeginReceive
    ... asynchronous data over a socket forever, handling it as it comes in. ... The app needs to continue to perform other tasks based on user input. ... same device) and call BeginRecieve. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: non-overlapped non-blocking WSARecv returns WSAEWOULDBLOCK, how co
    ... My app has only 1 socket, and after calling this for a few times, it forever keeps coming back with SOCKET_ERROR and WSAGetLastError== WSAWEWOULDBLOCK -- that's not nice, it is a non blocking socket, how could that be ... A blocking socket will block, and when new data arrive, the function will return and give them to you. ...
    (microsoft.public.win32.programmer.networks)
  • connect timeout for synchronous socket connection
    ... ..NET Sockets does not provide a ConnectTimeout when calling the Connect ... method while establishing a Synchronous socket connection. ... app is forced to wait a very long time before and Exception is thrown if the ...
    (microsoft.public.dotnet.framework)
  • Re: strange select() behavior
    ... example is the Linux UDP denial-of-service attack case. ... longer exist by the time you get around to calling 'accept'. ... about handing off a socket. ... 'statfs' said 10MB *was* free. ...
    (comp.unix.programmer)