Re: Between C and Java - which is easier for writing networking software



subramanian100in@xxxxxxxxx, India wrote:
Thanks to everyone.

I possess only ISO99 C and ISO98 C++ programming skills.

Since theoretical concepts about TCP/IP, SNMP etc. are common, I have
to learn them anyway, independent of programming language. I will do
that.

But I do not know multithreading, Interprocess Communication, Sokets
API, and other UNIX system calls.

Under this situation, between C and Java, which will be the language I
should choose to learn.

Either would work. I think you will find that Java is easier if
you want to do casual, regular tasks with TCP/IP. It's very easy
to set up a socket -- you just create a Socket object and call a
few methods on it, and away you go. Likewise, threads are very
easy in Java. If you want to make a server that listens on a
socket, creating a ServerSocket object and spawning a new thread
for every accepted connection is a task that will take a short
time indeed.

On the other hand, using the C language and the Berkeley sockets
API will get you a little bit closer to the machine, and you
might learn more details about how Unix works under the hood.
(Java intentionally hides those details, which is great for
making it easier to write portable programs but not as great for
helping you understand the details of what's going on behind the
scenes.)

Really, either language would be OK. There is no wrong answer
on this one. In fact, maybe the best answer is that you should
do a little network programming with both, just to compare the
approaches.

- Logan
.



Relevant Pages

  • Re: SO_REUSEPORT and multicasting
    ... programming class, ... on BSD socket ... But when binding to multicast ... SO_REUSEPORT (p. 731, "TCP/IP Illustrated, Volume ...
    (Linux-Kernel)
  • Re: chatting program
    ... can someone provide me an example to create chatting program? ... socket is like a tunnel that connects ... >> will it take me to learn sockets and TCP/IP programming? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: sockets in MFC
    ... Quinn and Shute, Windows Sockets Network Programming ... above books, I was able to integrate socket programming into a product in three days, ... add TCP/IP also?". ...
    (microsoft.public.vc.mfc)
  • Re: object system...
    ... for that you need machine language. ... isn't even as fast as other systems programming languages. ... Stroustrup's stated design goal was to enable ... all manner of elegance or abstraction can be sacrificed for speed, ...
    (comp.object)
  • Re: DirectX in HLA
    ... I guess that you have a great knowledge of DirectX ... > understanding by looking at them in assembly language... ... > actually represents, really, is a means to "undo" the OOP so ... > is NOT an "OOPL" (object-orientated programming language), ...
    (comp.lang.asm.x86)