socket pogramming(TCP)
Hi all!
I am doing socket programming using C and Linux. Does anyone know of any papers, documents or any articles that discuss why C is better for socket programming, what other languages it is possible to use, advantages and disadvantages, why use Linux or Windows, etc? Basically, looking into possibilities and choices of tools and ways to do soket programming. Thanks |
Re: socket pogramming(TCP)
Hi Im doing a similar sort of thing, but making it cross platform compatible. As for C being better for socket programming, better than what ?cornflakes lol. I myself will be using C++ as you can think of sockets as objects and my final application will be mutilthreaded; I believe C++ would be far better for this sort of thing as its much easier to use encapsultation and inheritance for different os's etc. (you could use java , but the reason for my networking etc is for a opengl game). As for wether to use windows or linux, i dont see much difference. Yes there are different library calls etc but this is not something which should put you off from using one OS or the other. I myself prefer Visual studio to anything linux can offer and for programming, this includes programming threads in windows using POSIX pthreads theres a nice library for this. http://sourceware.org/pthreads-win32/announcement.html |
Socket programming is usually a very small part of the larger program. It might be wiser to ask which program you want to create your program in and then do the socket programming in that language if it's appropriate.
|
The advantage of C is obviously speed. I've seen someone calling it "portable assembler". I like it because it isn't a bloated language. It's the perfect mix of abstraction and machine level. I personally don't like the level by which other languages hide the implementation.
I don't see a way by which C would be better for TCP/IP sockets other than this. Although let's not forget that sockets were designed primarily on BSD. The interface and some of this code were re-used later on Winsock. |
itsme86 is exactly right. 'C' can be an excellent choice for programming sockets ...
... but the *best* choice of all is the language that best fits the overall goals of your program. That, in turn, might be Java ... or Perl ... or just about anything imaginable. IMHO .. pSM |
All times are GMT -5. The time now is 04:29 PM. |