By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,458 Members | 1,278 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,458 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Jul 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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

Jul 19 '05 #2

P: n/a

"Jay" <k_*****@yahoo.com> wrote in message
news:44**************************@posting.google.c om...
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
Jul 19 '05 #3

P: n/a

"Jay" <k_*****@yahoo.com> wrote in message
news:44**************************@posting.google.c om...
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.
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.