[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c++

Passing parameters to an executable vs. passing them to a server

Ramon F Herrera

9/12/2009 3:45:00 AM


The only method that I have ever used to pass parameters to a program
is the good 'ole trusted:

main(int argc, char *argv[])

As of late, however, I began writing servers (more like "borrowing"
their code from the net :-), and I am not familiar with the method
used to pass arguments to them.

The specific server program that I modified is this one:

http://www.boost.org/doc/libs/1_40_0/doc/html/boost_asio/tutorial/tutdaytime...

It is a "daytime" server, which does not accept any arguments.

TIA,

-Ramon

6 Answers

Ramon F Herrera

9/12/2009 3:50:00 AM

0

On Sep 11, 11:45 pm, Ramon F Herrera <ra...@conexus.net> wrote:
> The only method that I have ever used to pass parameters to a program
> is the good 'ole trusted:
>
> main(int argc, char *argv[])
>
> As of late, however, I began writing servers (more like "borrowing"
> their code from the net :-), and I am not familiar with the method
> used to pass arguments to them.
>
> The specific server program that I modified is this one:
>
> http://www.boost.org/doc/libs/1_40_0/doc/html/boost_asio/tu......
>
> It is a "daytime" server, which does not accept any arguments.
>
> TIA,
>
> -Ramon

Never mind!!!

-Ramon

Ian Collins

9/12/2009 3:54:00 AM

0

Ramon F Herrera wrote:

Please restrict your cross-posting!

--
Ian Collins

Ramon F Herrera

9/12/2009 4:38:00 AM

0

On Sep 11, 11:53 pm, Ian Collins <ian-n...@hotmail.com> wrote:
> Ramon F Herrera wrote:
>
> Please restrict your cross-posting!
>
> --
> Ian Collins

Ian,

I don't mean to be rude, but...

Google News allows 5 newsgroups.

The creators of Usenet designed the ability to cross-post.

Take your issue with them.

The 3 newsgroup I posted to are pertinent.

What are your trying to save? Disk space?

Have you noticed the spam crap that Usenet has become?

Every time a legitimate article (like mine) is posted, it scrolls down
the spam.

-Ramon

Ramon F Herrera

9/12/2009 4:45:00 AM

0

On Sep 11, 11:45 pm, Ramon F Herrera <ra...@conexus.net> wrote:
> The only method that I have ever used to pass parameters to a program
> is the good 'ole trusted:
>
> main(int argc, char *argv[])
>
> As of late, however, I began writing servers (more like "borrowing"
> their code from the net :-), and I am not familiar with the method
> used to pass arguments to them.
>
> The specific server program that I modified is this one:
>
> http://www.boost.org/doc/libs/1_40_0/doc/html/boost_asio/tu......
>
> It is a "daytime" server, which does not accept any arguments.
>
> TIA,
>
> -Ramon


I was looking at this echo server:

http://www.boost.org/doc/libs/1_40_0/doc/html/boost_asio/example/echo/blocking_tcp_echo_...

and it looks like it is up to the coder to package the arguments on
the clients and break them down in the server?

Perhaps I need to construct the arguments like this?:

string arguments = "arg1 = this; arg2 = that; arg3 = whatever";

TIA,

-Ramon


Ian Collins

9/12/2009 5:17:00 AM

0

Ramon F Herrera wrote:
> On Sep 11, 11:53 pm, Ian Collins <ian-n...@hotmail.com> wrote:
>> Ramon F Herrera wrote:
>>
>> Please restrict your cross-posting!
>>
>
> Ian,
>
> I don't mean to be rude, but...
>
> Google News allows 5 newsgroups.
>
> The creators of Usenet designed the ability to cross-post.
>
> Take your issue with them.
>
> The 3 newsgroup I posted to are pertinent.

If you have a C++ language question, use c.l.c++, a Unix specific one,
c.l.p and use c.p for non-specific programming questions. This one
looks like a C++ question.

> Have you noticed the spam crap that Usenet has become?

No, I use a decent server and client.

--
Ian Collins

pjb

9/13/2009 2:49:00 AM

0

Ramon F Herrera <ramon@conexus.net> writes:
> I was looking at this echo server:
_____________________________^^^^^^

> http://www.boost.org/doc/libs/1_40_0/doc/html/boost_asio/example/echo/blocking_tcp_echo_...
__________________________________________________________________________________________^^^^^^



You are inconsistent. How do you expect us to answer meaningfully
inconsistent questions?


> and it looks like it is up to the coder to package the arguments on
> the clients and break them down in the server?

What are you talking about?


--
__Pascal Bourguignon__