You post so much useful code; I'm sure others have said before, but 'Idle' is not the correct username for someone so productive
atomic web server threads
Re: atomic web server threads
Thanks, I think I may have a use for this in the very near future.
You post so much useful code; I'm sure others have said before, but 'Idle' is not the correct username for someone so productive
You post so much useful code; I'm sure others have said before, but 'Idle' is not the correct username for someone so productive
Re: atomic web server threads
Thanks pjay, I've pursued being Idle for 30 odd years and now I get to live it! On an Island near the International Date Line East.pjay wrote: Thu Mar 28, 2024 7:56 am Thanks, I think I may have a use for this in the very near future.
You post so much useful code; I'm sure others have said before, but 'Idle' is not the correct username for someone so productive![]()
Re: atomic web server threads
You creature becomes better and better 
Re: atomic web server threads
Thanks, it's definitely a creature but it's alive.
Re: atomic web server threads
added
Atomic_Server_Chr(v.i) ;return a proper surrogate pair for unicode values outside the BMP (Basic Multilingual Plane)
Tarted up the landing page and error page with google fonts and added favicon
Atomic_Server_Chr(v.i) ;return a proper surrogate pair for unicode values outside the BMP (Basic Multilingual Plane)
Tarted up the landing page and error page with google fonts and added favicon
Re: atomic web server threads
On the first Atomic_Server_Init call you wrote "wwww" instead of "www" 
Re: atomic web server threads
Trying to use the server through internet (not local):
I changed the IPs to match the IP on my VPS.
I Opened the firewall for the atomic server.
Now I can access from internet (I can get simple pages), but...
I try to load a SpiderBasic example (the one called dialog.html) and it doesn't work, the background image start to load slowly, but abort.
Any idea what I'm doing wrong?
https://prnt.sc/5L5T1CXrYWnC
I changed the IPs to match the IP on my VPS.
I Opened the firewall for the atomic server.
Now I can access from internet (I can get simple pages), but...
I try to load a SpiderBasic example (the one called dialog.html) and it doesn't work, the background image start to load slowly, but abort.
Any idea what I'm doing wrong?
https://prnt.sc/5L5T1CXrYWnC
Re: atomic web server threads
I did that as a test so it would go to the internal handler.Caronte3D wrote: Fri Mar 29, 2024 10:21 am On the first Atomic_Server_Init call you wrote "wwww" instead of "www"![]()
As for the other issue I don't know, maybe it's a time out or a buffer size
Re: atomic web server threads
v 3.0.b2
adjusted buffer size and redid mutex
adjusted buffer size and redid mutex
Re: atomic web server threads
Works nice with the last update 
Re: atomic web server threads
v3.0.6b3
changed scope of mutex, increased buffer size, still a bit slow across the big ditch, as in geographically opposite me.
changed scope of mutex, increased buffer size, still a bit slow across the big ditch, as in geographically opposite me.
Re: atomic web server threads
v3.0.6b4
fixed thread clean up
fixed thread clean up
Re: atomic web server threads
v 3.0.7b1
Added Tag Preprocessor.
It assumes you have an html page with the the tag <?PB ElementsFillTable/> saved as .pbh and it will call the named runtime procedure to fill in the tag with dynamic html content. This eliminates the need for CGI or server side scripting languages as you have all the power of PureBasic to do what ever you want to fill in the content and it also gives you full access to the request and all it's parameters.
I've been thinking about the easiest option to host multiple sites on the same ports and it's really easy to do, so I think that will be the next task.
All you will need to do is name your www folders as the domain name eg -www.foo.com- and -www.bar.com- and then you can host multiple sites with the same server. (minus the - either end )
Added Tag Preprocessor.
It assumes you have an html page with the the tag <?PB ElementsFillTable/> saved as .pbh and it will call the named runtime procedure to fill in the tag with dynamic html content. This eliminates the need for CGI or server side scripting languages as you have all the power of PureBasic to do what ever you want to fill in the content and it also gives you full access to the request and all it's parameters.
I've been thinking about the easiest option to host multiple sites on the same ports and it's really easy to do, so I think that will be the next task.
All you will need to do is name your www folders as the domain name eg -www.foo.com- and -www.bar.com- and then you can host multiple sites with the same server. (minus the - either end )
Re: atomic web server threads
Awesome! 
Re: atomic web server threads
Very nice "example" piece of work 
The multi-threaded webserver project I abandoned grew in 16,000-20,000 lines, had many features but ultimately it grew too complex and I shot myself in the foot. It could even read .htaccess files to some degree and the other user/group configuration files "as if" supporting a few of those important basic function for auth or DirectoryIndex, on-the-fly zlib compression, SSL (but I have no valid certificates or don't understand enough of it), cached files, webforms, CGI (but not fast-cgi by the end) etc. I invented a pseudo script/batch to have a similar functionality to the tag preprocessor (I suppose) but perhaps too complicated and restricted in itself. Essentially it would be html pages with embedded batch/script parts but it went ugly
So hats off to your elegant solutions - I'll peek deeper into it, especially the tag preprocessor which attracts most of my curiosity for now
The multi-threaded webserver project I abandoned grew in 16,000-20,000 lines, had many features but ultimately it grew too complex and I shot myself in the foot. It could even read .htaccess files to some degree and the other user/group configuration files "as if" supporting a few of those important basic function for auth or DirectoryIndex, on-the-fly zlib compression, SSL (but I have no valid certificates or don't understand enough of it), cached files, webforms, CGI (but not fast-cgi by the end) etc. I invented a pseudo script/batch to have a similar functionality to the tag preprocessor (I suppose) but perhaps too complicated and restricted in itself. Essentially it would be html pages with embedded batch/script parts but it went ugly
So hats off to your elegant solutions - I'll peek deeper into it, especially the tag preprocessor which attracts most of my curiosity for now


