Click to See Complete Forum and Search --> : best language for socket programming


NEcron
02-21-2001, 08:17 AM
Hi everyone
im looking to write a program that sends sms throught the icq servers ive done the tcp dumpping and everything.
doing this means socket programming
im jst looking for your opinion on what lanuage you believe is best for socket programming and maybe some links to information on socket programming in that language
i was kinda looking at C++ but i cant seem to find any info on it ive read some info on C socket programming and alittle on PERL socket programming (kinda powerless) p.s pls dont flame me
and the URL or names of good c/c++ socket libarys would also be very helpfull
anyways thank u very much for your input

p.s i would sppreciate if the posts didnt consist of
JAVA rulz or what not insnt very helpfull
anyways by

[ 21 February 2001: Message edited by: NEcron ]

jemfinch
02-21-2001, 09:25 AM
You'll find that most socket interfaces follow pretty closely the BSD socket interface, which was originally in C but has carried over to languages such as python, perl, java (I think) and probably any other language you can't think of.

Given that, you'll want to pick a language that gives you best support for your field and your programming style.

By programming style, I mean that it's not very useful to pick a language that has the best, cleanest, object oriented interface to sockets that you've ever seen when you're a functional programmer at heart.

"Support for your field", on the other hand, is much harder to define. Basically, you'll want to pick the language that has the highest level, most flexible interfaces available. The language that does the most for you without restricting you unduly.

I think python is that language. In particular, one of my favorite modules in python is "asyncore". Asyncore makes it very easy to write asynchronous i/o servers, the easiest to program and fastest server model around. I can't say enough good stuff about asyncore. Even if you're just writing a client, it lends an amount of robustness to your code that you'll rarely find in homecooked solutions.

Learning python will take you a couple hours. Learning the asyncore interface will take a bit longer. Check out http://www.python.org/doc/ and http://www.nightmare.com/medusa/programming.html for more information on python and asyncore, respectively.

(As a note, in case you're curious about my claims about asyncore: they're not overly exagerated. Zope, an amazingly full featured web application publishing program, uses asyncore for its webserving and ftpserving.)

Jeremy

EDIT: I should also say that if your goal is to learn rather than to "get things done", you're best using the original C socket interface. You'll learn more from the quirks of that than you will from any of the other layers other languages put on top of it.

[ 21 February 2001: Message edited by: jemfinch ]

NEcron
02-21-2001, 04:41 PM
yeah thanx for the input
ill give it a try i am looking to solve the problem im sure i can learn jst alittle along the way thought
ill get a running prototype going first then look at other means
anyways thanx heaps dude
:D