Newbie question: Atomic Web Server under MacOSX

Mac OSX specific forum
nikoniko
User
User
Posts: 20
Joined: Fri Nov 11, 2011 7:58 am

Newbie question: Atomic Web Server under MacOSX

Post 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.
nikoniko
User
User
Posts: 20
Joined: Fri Nov 11, 2011 7:58 am

Re: Newbie question: Atomic Web Server under MacOSX

Post by nikoniko »

Ok, I found a first answer - it was a GetCurrentDir() behavior

Fixed.

How to fix a port capture?
nikoniko
User
User
Posts: 20
Joined: Fri Nov 11, 2011 7:58 am

Re: Newbie question: Atomic Web Server under MacOSX

Post by nikoniko »

nikoniko wrote:How to fix a port capture?
It seems no way to fix this on the app developer level.
nikoniko
User
User
Posts: 20
Joined: Fri Nov 11, 2011 7:58 am

Re: Newbie question: Atomic Web Server under MacOSX

Post 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 
Post Reply