NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Wolfgang Orth on May 06, 2011, 02:45:31 AM

Title: Conditional Server possible?
Post by: Wolfgang Orth on May 06, 2011, 02:45:31 AM
Hello Bruce and all ;-)

What I have learned from the examples so far is, that each example has the server in the MAIN procedure.

My recent project is a (web/soap/simple)server that receives requests and then displays data, without sending anything valuable back. Its unusual, but its part of the design.

I ran into a restriction at one site, that locally running programs are not allowed to provide server funtionality. This is understandable. But I do not want to provide two different programs, one being a local client that receives data per HTTP and one other being client only, but both with the same core functionality.

My idea is to start the program with a parameter like /s which in this case activates the server-part.

If no /s used, its a simple program as any other is.

The question now, is it possible to have the server functionality in a separate procedure, which is called conditionaly when one of the parameters is "/s"?

Thanks,
Wolfgang
Title: Re: Conditional Server possible?
Post by: Bruce on May 06, 2011, 03:05:02 AM
yes, absolutely.
The WebServer procedure can be any procedure in the app.

Cheers
Bruce
Title: Re: Conditional Server possible?
Post by: Wolfgang Orth on May 06, 2011, 03:09:56 AM
Is there anything we CAN'T do with Nettalk, Bruce?

Thanks ......