Page 1 of 1

Newbie question: Atomic Web Server under MacOSX

Posted: Sat Feb 07, 2015 7:34 pm
by nikoniko
Hello,

I make a hybrid application (HTML5 interface and WebServer backend in an one application) for Framework7 dev build system. Link to announce about it http://www.idangero.us/framework7/forum ... ev-builder

HTML5 frontend uses WebGadget.
Webserver is based on Atomic Web Server with little changes to support large file upload/download.

I did the windows version at first. It works, seems without any issues. Now I am trying port app to macos.

MacosX version works too... but only when it has been started from ide, the compiled version opens main windows with empty webgadget and I can't do any navigation for webgadget.

Any ideas why does it happen?

The second question about annoyed message "Error: can't create the server (port in use ?)." when I restarts application, I have to wait some time for free socket to launch a new build of my app.

I thought socket is unbinded and became free after application was closed.

Re: Newbie question: Atomic Web Server under MacOSX

Posted: Sun Feb 08, 2015 7:13 am
by nikoniko
Ok, I found a first answer - it was a GetCurrentDir() behavior

Fixed.

How to fix a port capture?

Re: Newbie question: Atomic Web Server under MacOSX

Posted: Tue Feb 10, 2015 10:57 am
by nikoniko
nikoniko wrote:How to fix a port capture?
It seems no way to fix this on the app developer level.

Re: Newbie question: Atomic Web Server under MacOSX

Posted: Thu Feb 12, 2015 10:08 am
by nikoniko
I fixed it by selecting next free port

Code: Select all

Port = 7080

While Port < 7090
  Debug Port
  ;InitNetwork()
  If CreateNetworkServer(Port, Port)
    Break
  Else
    ;MessageRequester(AtomicTitle$, "Error: can't create the server (port in use ?)." + Str(Port), 0)
    ;CloseNetworkServer(0)
    Port + 1
    ;Delay(1000)
  EndIf

Wend