NetTalk Central

Author Topic: Conditional Server possible?  (Read 4821 times)

Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Conditional Server possible?
« 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11302
    • View Profile
Re: Conditional Server possible?
« Reply #1 on: May 06, 2011, 03:05:02 AM »
yes, absolutely.
The WebServer procedure can be any procedure in the app.

Cheers
Bruce

Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Re: Conditional Server possible?
« Reply #2 on: May 06, 2011, 03:09:56 AM »
Is there anything we CAN'T do with Nettalk, Bruce?

Thanks ......