[a litle OT] network programming

Discussion in 'C++' started by Boris Glawe, Sep 15, 2004.

  1. Boris Glawe

    Boris Glawe Guest

    Hi,

    I am going to write a client/server based application with for Linux in C++. I
    am programming C++ on purpose.

    There are many tutorials out there how to create a new socket, and receive and
    send data.

    The only thing those tutorials do not cover ist how to handle the data which
    arrives over the NIC. Do I have do implement my own kind of networkprotocol
    specific to my application? This would be very dangerous, as there can be many
    structural failures in a protocol.

    My application will be XML based - at least the data I am going to send over the
    network. Are there some (open source) technolgies, which help me with this
    basic task (which is sending arbitray data - in my case XML - from one machine
    to another)

    in addition: what do I have to take care for if I want to avoid any security
    issues? The data received by my application can be anyting including malicious
    machine code. How do I handle such issues ?

    thanks Boris
     
    Boris Glawe, Sep 15, 2004
    #1
    1. Advertising

  2. Boris Glawe

    Default User Guest

    Boris Glawe wrote:

    > Hi,
    >
    > I am going to write a client/server based application with for Linux
    > in C++. I am programming C++ on purpose.


    A *little* OT? How about completely OT? There is no way to do any of
    this in ISO standard C++.


    Please find a newsgroup dedicated to your platform.



    Brian Rodenborn
     
    Default User, Sep 15, 2004
    #2
    1. Advertising

  3. Boris Glawe

    Boris Glawe Guest

    Default User wrote:
    > Boris Glawe wrote:
    >
    >
    >>Hi,
    >>
    >>I am going to write a client/server based application with for Linux
    >>in C++. I am programming C++ on purpose.

    >
    >
    > A *little* OT? How about completely OT? There is no way to do any of
    > this in ISO standard C++.


    How is it possible then that there are millions of C++ programs doing a lot of
    networking?

    >
    >
    > Please find a newsgroup dedicated to your platform.
    >
    >


    I've actually posted in comp.protocols.misc and they've sent me to a c++ newsgroup.
    You can avoid further traffic if you give me a hint, where to find a hint or an
    answer !
     
    Boris Glawe, Sep 15, 2004
    #3
  4. Boris Glawe wrote:
    > How is it possible then that there are millions of C++ programs doing a
    > lot of networking?


    Because most programs are not strictly conforming (that is, fully
    portable). They rely on platform-dependent features to do things that
    can't be done in standard C++. If they want to be portable to several
    platforms, they create a layer of abstraction which compiles differently
    on different platforms. To add these features to the standard would put
    a burden on those implementing C++ compilers and libraries (and their
    job is tough enough already.)

    > You can avoid further traffic if you give me a hint, where to find a
    > hint or an answer !


    You're attempting to blackmail us. That's funny. Try again when you're a
    bit older.
    --
    Derrick Coetzee
    I grant this newsgroup posting into the public domain. I disclaim all
    express or implied warranty and all liability. I am not a professional.
     
    Derrick Coetzee, Sep 15, 2004
    #4
  5. Boris Glawe

    Default User Guest

    Boris Glawe wrote:

    > Default User wrote:
    > > Boris Glawe wrote:
    > >
    > >
    > > > Hi,
    > > >
    > > > I am going to write a client/server based application with for
    > > > Linux in C++. I am programming C++ on purpose.

    > >
    > >
    > > A little OT? How about completely OT? There is no way to do any of
    > > this in ISO standard C++.

    >
    > How is it possible then that there are millions of C++ programs doing
    > a lot of networking?


    They use nonstandard platform extensions.


    Please follow usenet courtesies by finding and reading the group FAQ,
    plus reviewing at least a couple of weeks worth of messages to see what
    topics are discussed.



    Brian Rodenborn
     
    Default User, Sep 15, 2004
    #5
  6. Boris Glawe

    Boris Glawe Guest


    >
    >> You can avoid further traffic if you give me a hint, where to find a
    >> hint or an answer !

    >
    >
    > You're attempting to blackmail us. That's funny. Try again when you're a
    > bit older.


    I don't know what "blackmailing" is!
    Isn't it justified to ask a question, though it's OT when you don't know where
    to start with your problem? I am asking you as programmers how one usually sends
    data over a network in a way that the networking process is both usefull and
    secure. This is what many applications do. But I don't know where to begin. And
    though the solution might be platform dependent there might be helpfull answers.

    If you ask a taxi driver, where the main station is, you usually won't get the
    answer "this is off topic". I usually help guys in my situation - with content
    and links. And yes, I have googled before posting !
     
    Boris Glawe, Sep 15, 2004
    #6
  7. Boris Glawe

    Boris Glawe Guest

    >
    > They use nonstandard platform extensions.
    >
    >
    > Please follow usenet courtesies by finding and reading the group FAQ,
    > plus reviewing at least a couple of weeks worth of messages to see what
    > topics are discussed.
    >

    Usually people don't call themself "default user" according to your usenet
    courtesis.

    Where can I get help?

    >
    >
    > Brian Rodenborn
     
    Boris Glawe, Sep 15, 2004
    #7
  8. Boris Glawe

    Default User Guest

    Boris Glawe wrote:

    > >
    > > They use nonstandard platform extensions.
    > >
    > >
    > > Please follow usenet courtesies by finding and reading the group
    > > FAQ, plus reviewing at least a couple of weeks worth of messages to
    > > see what topics are discussed.
    > >

    > Usually people don't call themself "default user" according to your
    > usenet courtesis.


    Why? It's as good as any other handle. Should I change it to Boris
    Glawe?

    > Where can I get help?


    How would I know? It's your platform, do a bit of basic research. Use
    http://groups.google.com to search on some key terms. If it happens
    that you are using a UNIX system, then try comp.unix.programmer. If
    Windows, then I never remember those MS group names, so I can't help
    there.



    Brian Rodenborn
     
    Default User, Sep 15, 2004
    #8
  9. Boris Glawe

    David Guest

    Boris,

    On Wed, 15 Sep 2004 18:13:25 UTC, Boris Glawe <> wrote:

    > Hi,
    >
    > I am going to write a client/server based application with for Linux in C++. I
    > am programming C++ on purpose.


    Good for you. I hate it when people do it by accident.

    Sorry, couldn't resist. I'm still eating breakfast. I'll ty to be more
    serious now.

    > There are many tutorials out there how to create a new socket, and receive and
    > send data.


    Yes, these are the basis for communications protocols with IP (including
    TCP and UDP). Each OS has its own interface to the IP Stack. That is where

    others worry about the C++ Standard not covering this.

    You've found one or more examples so I'll go from there.

    > The only thing those tutorials do not cover ist how to handle the data which
    > arrives over the NIC. Do I have do implement my own kind of networkprotocol
    > specific to my application? This would be very dangerous, as there can be many
    > structural failures in a protocol.


    You are likely not wanting to handle communications at the NIC or IP level
    or any other level very low in the protocol stacks. For XML conversations
    you will probably use TCP sockets. If you also want to handle such XML
    communications similar to HTTP requests that puts further restrictions on
    what port your server socket is tied to.

    Try looking for one of the *tcp-ip forums. Several of the Unix/linux
    forums may also be useful if you need more details.

    > My application will be XML based - at least the data I am going to send over the
    > network. Are there some (open source) technolgies, which help me with this
    > basic task (which is sending arbitray data - in my case XML - from one machine
    > to another)


    There are tools that provide the entire package of communicatons plus XML.
    Depending on your needs, you may want to write generic TCP/IP client-servers
    and then pass the messages on you your XML processors. Again, this depends
    on what you want to do. Simple XML over HTTP put-get conversations are
    rather limited in capability (IMO) but appear to be the norm for many such
    conversations. If that fits your needs, go for it. For more complicated
    XML conversations, like multiple XML packets in a single direction, you
    will need to handle a bit more of each protocol level.

    > in addition: what do I have to take care for if I want to avoid any security
    > issues? The data received by my application can be anyting including malicious
    > machine code. How do I handle such issues ?


    Always validate your data and that it makes sense. Avoid common pitfalls
    such as allowing buffer overruns to corrupt your data.

    > thanks Boris


    David
     
    David, Sep 16, 2004
    #9
  10. Boris Glawe

    Mike Smith Guest

    Boris Glawe wrote:
    >
    > If you ask a taxi driver, where the main station is, you usually won't
    > get the answer "this is off topic".


    But that probably is the answer you will get if you ask an auto mechanic.

    --
    Mike Smith
     
    Mike Smith, Sep 16, 2004
    #10

  11. >
    > How would I know? It's your platform, do a bit of basic research. Use
    > http://groups.google.com to search on some key terms. If it happens
    > that you are using a UNIX system, then try comp.unix.programmer. If
    > Windows, then I never remember those MS group names, so I can't help
    > there.
    >


    news:comp.os.ms-windows.programmer.win32 might be one place to start
    although I'm sure there are Windows groups devoted to networking as well.

    john
     
    John Harrison, Sep 16, 2004
    #11
  12. Boris Glawe

    Default User Guest

    John Harrison wrote:

    >
    > >
    > > How would I know? It's your platform, do a bit of basic research.
    > > Use http://groups.google.com to search on some key terms. If it
    > > happens that you are using a UNIX system, then try
    > > comp.unix.programmer. If Windows, then I never remember those MS
    > > group names, so I can't help there.
    > >

    >
    > news:comp.os.ms-windows.programmer.win32 might be one place to start
    > although I'm sure there are Windows groups devoted to networking as
    > well.


    Rereading his original message via someone else's quote, I see that he
    wanted a Linux solution. Therefore, c.u.p. or a Linux newsgroup would
    be a good starting point.



    Brian Rodenborn
     
    Default User, Sep 16, 2004
    #12
  13. Boris Glawe

    Boris Glawe Guest


    >
    > Rereading his original message via someone else's quote, I see that he
    > wanted a Linux solution. Therefore, c.u.p. or a Linux newsgroup would
    > be a good starting point.
    >


    Thanks !
     
    Boris Glawe, Sep 16, 2004
    #13
  14. Boris Glawe

    Boris Glawe Guest

    Ok, thanks I'll follow your hints !

    greets Boris
     
    Boris Glawe, Sep 16, 2004
    #14
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kal
    Replies:
    1
    Views:
    9,534
    Kevin Spencer
    Jun 21, 2004
  2. Jane Davis

    Network Service account over network

    Jane Davis, Jun 22, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    454
    Kevin Spencer
    Jun 22, 2005
  3. Bill Volk
    Replies:
    1
    Views:
    3,155
    Bill Volk
    Jul 2, 2003
  4. Kirk Haines

    Simple litle style question

    Kirk Haines, Feb 14, 2004, in forum: Ruby
    Replies:
    2
    Views:
    117
    Jim Weirich
    Feb 14, 2004
  5. George Mpouras

    lest talk a litle more about directories

    George Mpouras, Jul 26, 2013, in forum: Perl Misc
    Replies:
    25
    Views:
    344
    Charlton Wilbur
    Jul 29, 2013
Loading...

Share This Page