Got it. That would be a socket issue. If I recall at the time I never found
a way to determine if a port was being used by another application or not.
I wish there was a way because then we could have Gnoga search for an open
port and then register with some registry app which ports an app are using
and load balance etc. thought the registry app. Would also allow for hot
swapping Gnoga apps and other niceties for larger systems.

David Botton
On Mon, May 22, 2017 at 3:38 PM Gautier de Montmollin <gdem...@hotmail.com>
wrote:

> Also had this case a few times - typically, with two versions of the same
> app: one running from GPS, one "standalone" I forgot to kill.
>
> It took me some time to realize the one in GPS was unresponsive because of
> the other one...
>
> Perhaps the question could be "is there a distracted-developer-protection
> feature" ;-)
> ------------------------------
> *From:* Pascal <blady-...@users.sf.net>
> *Sent:* Monday, May 22, 2017 7:31:21 PM
> *To:* Gnoga support list
> *Subject:* Re: [Gnoga-list] How to check if an application is already
> connected?
>
> Hello David,
>
> In fact, I was wondering about the second application with nothing warns
> that a former application is running:
>
> Run a first Gnoga app in a terminal window:
>
> cmd$ bin/othello
> Gnoga            :1.3-alpha
> Application root :/gnoga-code/
> Executable at    :/gnoga-code/bin/
> HTML root        :/gnoga-code/html/
> Upload directory :/gnoga-code/upload/
> Templates root   :/gnoga-code/templates/
> /js  at          :/gnoga-code/js/
> /css at          :/gnoga-code/css/
> /img at          :/gnoga-code/img/
> Boot file        :boot.html
> HTTP listen on   ::8080
> Press Ctrl-C to close server.
> 2017-05-22 21:24:35.14 : HTTP Server Started
> 2017-05-22 21:25:34.18 : New connection - ID 1
> 2017-05-22 21:25:35.14 : Ping on websocket - 1
>
> Run a second Gnoga app in another terminal window:
>
> cmd$ bin/tic_tac_toe
> Gnoga            :1.3-alpha
> Application root :/gnoga-code/
> Executable at    :/gnoga-code/bin/
> HTML root        :/gnoga-code/html/
> Upload directory :/gnoga-code/upload/
> Templates root   :/gnoga-code/templates/
> /js  at          :/gnoga-code/js/
> /css at          :/gnoga-code/css/
> /img at          :/gnoga-code/img/
> Boot file        :boot.html
> HTTP listen on   ::8080
> Press Ctrl-C to close server.
> 2017-05-22 21:26:41.16 : HTTP Server Started
>
> All further browser connections are going to the former app.
>
> How to display a warning that another app is running on the same
> connection?
>
> Thanks, Pascal.
> http://blady.pagesperso-orange.fr
>
>
> > Le 22 mai 2017 à 03:40, David Botton <da...@botton.com> a écrit :
> >
> > I assume you are talking about a single connection application. I don't
> think I built in anything to allow the currently running app to know there
> was an attempt to connect again (should be easy to add). If multiple
> connection just setup (in a task safe way) whatever mechanism you want
> atomic variable, etc. or I think you recently added a count of currently
> live connections.
> >
> > David Botton
> >
> >
> > On Sun, May 21, 2017 at 1:58 PM Pascal <blady-...@users.sf.net> wrote:
> > Hello,
> >
> > If a Gnoga application is already connected then if you run another
> Gnoga application with the same connection then no error is logged.
> >
> > How to check that an other connection is already on?
> >
> > Thanks, Pascal.
> > http://blady.pagesperso-orange.fr
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Gnoga-list mailing list
> > Gnoga-list@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gnoga-list
> >
> ------------------------------------------------------------------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org!
> http://sdm.link/slashdot_______________________________________________
> > Gnoga-list mailing list
> > Gnoga-list@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gnoga-list
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gnoga-list mailing list
> Gnoga-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gnoga-list
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gnoga-list mailing list
> Gnoga-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gnoga-list
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to