473,542 Members | 7,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
3 14853
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

"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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1546
by: ViPeR | last post by:
Hi, I was wondering, is there any support for network programming in C++. Java doesn't seem to lack in this arena. Socket programming is very simple in Java. Does C++ have any libraries for networking, whether standard or 3rd party? Thank you.
3
1228
by: Mikael Auno | last post by:
Hi. I'd like to learn som network programming in C++, but I don't quite know where to start. I already know socket programming in Java so on the networking part there's no problem. I'd just like to know where I can find some info about the usual conventions of network programming when it comes to C++, preferably nothing specific either to...
2
1134
by: darrell.blake | last post by:
I'm wanting to do some network programming in C++ but I'm not sure where to start looking. I would prefer it if it was portable over multiple operating systems. I believe there are a number of problems programming in raw sockets when porting. I've seen something called ACE which I was considering looking at. It's times like this I realise...
6
2380
by: John Walton | last post by:
Hello, everyone. I just began school, and they already assigned us science fair. Since I'm in 8th grade, I get to do demonstrations for our projects. I'm probably going to demonstrate Python's networking capabilities by writing a simple instant messenger program. I only have a few problems: 1. I know squat about Python network...
5
2161
by: Terry | last post by:
Could someone please suggest me a good book to learn network programming. I have been programming in C#/VB.NET/VB 6.0 and have also used a bit of C++ (not MFC/ATL/COM) I am a total novice when it comes to networks and I don't even know the basics. I need a book which teaches me everything I need to get started with programming in...
6
2710
by: DanielJohnson | last post by:
I have done some regular C programming and still learning. I was wondering if you could guide me through good resources for thread programming and socket programming in C. I have done something in python but now I want to do it in C. Every help is appreciated.
4
1704
AmberJain
by: AmberJain | last post by:
I'm not a JAVA newbie..... I'm ABSOLUTE JAVA illiterate person.................. Recently, while I was planning to learn a new programming language, one of my friends advised me to learn JAVA. Now I'm confused in choosing which language I should start learning. So, I have some questions regarding JAVA, which are really EASY to answer...
1
20561
by: Ryan Liu | last post by:
Hi, I have a 100 clients/ one server application, use ugly one thread pre client approach. And both side user sync I/O. I frequently see the error on server side(client side code is same, but I don't see the error): "System.IO.IOException: Unable to read data from the transport connection:A blocking operation was interrupted by a call...
1
1335
by: yukijocelyn | last post by:
Hi I am currently programming a TCP socket to transfer large files. My client is running on .NET application and my server is running on Java. I am using TCP socket to transfer file over the network, and I am able to achieve it only if I segment my own file and then send them over the network one segment by one segment. I would like to ask...
0
7384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7567
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7718
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7316
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5862
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5239
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3377
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1790
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.