Re: Reconnecting to a socket

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 12/25/04

  • Next message: Andrew Chalk: "Re: Reconnecting to a socket"
    Date: Sat, 25 Dec 2004 13:47:08 -0800
    
    

    Can't say for sure what are you doing, but it sounds like
    you are mixing up the listening and accepted sockets.
    You are supposed to be listening continuously on the
    listening socket. When a connection arrives you should
    accept it and continue listening right away. The accepted
    socket carries out all communication with the client, the
    listening socket carries no data.

    -- 
    =====================================
    Alexander Nickolov
    Microsoft MVP [VC], MCSD
    email: agnickolov@mvps.org
    MVP VC FAQ: http://www.mvps.org/vcfaq
    =====================================
    "Andrew Chalk" <achalk@XXXmagnacartasoftware.com> wrote in message 
    news:%23tqjhHj6EHA.2124@TK2MSFTNGP15.phx.gbl...
    >I have written a Winsock client/server application. When the client is
    > finished it issues a closesocket(). If I run it again it gets an 
    > FD_CONNECT
    > from the server with NetworkEvents.lNetworkEvents = 0. However, the server
    > never gets any events (I am expecting at least an FD_ACCEPT) .
    >
    > When a connecting client disconnects from a listening server is there
    > something that the server should do in order to hear new connection
    > attempts? I have issuing bind() again (error) and listen() again() (return
    > code success) to no avail. The listening server never hears new connection
    > attempts.
    >
    > Many thanks.
    >
    > 
    

  • Next message: Andrew Chalk: "Re: Reconnecting to a socket"

    Relevant Pages

    • Re: RealVNC
      ... I recently upgraded a client to SBS 2003 Premium with ISA. ... This server was so full of trojans, spyware, ... the vendor complained because I would not let pcAnywhere ... Then there is default Java listening port on port 5800 on the ...
      (microsoft.public.windows.server.sbs)
    • Re: RealVNC
      ... Default listening port for RealVNC server that runs on the machine on which ... Then there is default Java listening port on port 5800 on the client machine ...
      (microsoft.public.windows.server.sbs)
    • Re: RealVNC
      ... I use VNC behind server ... Default listening port for RealVNC server that runs on the machine ... And then "other"party - not the client can run RealVNC Viewer in ...
      (microsoft.public.windows.server.sbs)
    • Re: RealVNC
      ... I use VNC behind server ... Then there is default Java listening port on port 5800 on the client ...
      (microsoft.public.windows.server.sbs)
    • Re: SMTP Relay....Driving me crazy....
      ... As far as I know Exchange will only listen on one port. ... I added another small app listening ... The confusing part is the 'free little mail server' and why you would run ... You should tell your client that the remote user will only be able to ...
      (microsoft.public.windows.server.sbs)