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

J

Jay

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
 
U

Unforgiven

Jay said:
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.
 
J

John Harrison

Jay said:
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
 
G

Govindan

Jay said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top