Which is better,C++ or Java,for network programming

Discussion in 'C++' started by Jay, Sep 3, 2003.

  1. Jay

    Jay Guest

    Hi,

    I implemeneted an FTP client and server long time back using Java. I
    found sockets porgramming in java quite useful and easy to handle. I
    now wanted to implement a similar program using C++. My questions are
    1. How good a language is C++ for network programming?
    2. what are good onine resources to learn C++ network programming?
    3. How similar it is to Java socket programming?

    Thanks in advance.
    Jay
     
    Jay, Sep 3, 2003
    #1
    1. Advertising

  2. Jay

    Unforgiven Guest

    Jay wrote:
    > Hi,
    >
    > I implemeneted an FTP client and server long time back using Java. I
    > found sockets porgramming in java quite useful and easy to handle. I
    > now wanted to implement a similar program using C++. My questions are
    > 1. How good a language is C++ for network programming?


    C++ as a language contains nothing that'll aid you in network programming.
    As such this discussion is off topic on this newsgroup. However, I'll point
    you in the right direction. The most common method of accessing the network
    in C(++) is using an API called Berkeley Sockets. You'll find it in every
    Unix variant that I know of, and Windows has a largely equivalent version
    called Windows Sockets. Depending on the platform you're targetting, you'll
    probably want to ask this question again in a newsgroup specifically for
    this platform.

    > 3. How similar it is to Java socket programming?


    I don't really know, but the Berkeley Sockets model is fairly universally
    accepted (and older than Java), so I wouldn't surprise me one bit if Java
    socket programming was derived from Berkeley Sockets, so it *could* be
    pretty similar.

    --
    Unforgiven

    "Most people make generalisations"
    Freek de Jonge
     
    Unforgiven, Sep 3, 2003
    #2
    1. Advertising

  3. "Jay" <> wrote in message
    news:...
    > Hi,
    >
    > I implemeneted an FTP client and server long time back using Java. I
    > found sockets porgramming in java quite useful and easy to handle. I
    > now wanted to implement a similar program using C++. My questions are
    > 1. How good a language is C++ for network programming?
    > 2. what are good onine resources to learn C++ network programming?
    > 3. How similar it is to Java socket programming?
    >
    > Thanks in advance.
    > Jay


    C++ has no support for sockets. It all depends on which platform you are
    programming for. Java runs on the Java platform, C++ runs on any platform. A
    consequence of this is that the number of things that can be done as
    standard in C++ is far less than in Java. Whether this means Java is better
    or worse than C++ is up to you.

    So, if you want to do socket programming in C++ you should ask in a group
    that supports whatever platform you are using.

    john
     
    John Harrison, Sep 3, 2003
    #3
  4. Jay

    Govindan Guest

    "Jay" <> wrote in message
    news:...
    > Hi,
    >
    > I implemeneted an FTP client and server long time back using Java. I
    > found sockets porgramming in java quite useful and easy to handle. I
    > now wanted to implement a similar program using C++. My questions are
    > 1. How good a language is C++ for network programming?
    > 2. what are good onine resources to learn C++ network programming?
    > 3. How similar it is to Java socket programming?
    >
    > Thanks in advance.
    > Jay


    There are some low-level network programs that cant be written in Java
    without
    using a native interface. Most useful network tools and applications are
    written in C for speed.
    Larger network programs or toolkits or frameworks may be written using C++
    wrapper classes
    wrapping over the C parts.
    Java socket programming is simplified compared to C/C++ network programming.
     
    Govindan, Sep 9, 2003
    #4
    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. Replies:
    8
    Views:
    1,870
  2. ge0rge
    Replies:
    5
    Views:
    525
  3. IchBin
    Replies:
    0
    Views:
    410
    IchBin
    May 1, 2005
  4. Hal Rosser
    Replies:
    1
    Views:
    471
  5. Amandil

    Which programming method is better?

    Amandil, Feb 28, 2008, in forum: C Programming
    Replies:
    10
    Views:
    504
    David Thompson
    Mar 10, 2008
Loading...

Share This Page