Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

userlan667

macrumors newbie
Original poster
Jan 1, 2007
2
0
I am starting work on a cross platform VOIP server/client program. I am going to start it on my Mac then port it over the Windows later on. I talked to some people and they said the best thing to do it in is C++. The only problem that I am having is that I have no idea how to make a C++ program with a GUI on a mac and I am unable to find any example programs or tutorials on how to do this. I also am unable to find any thing on C++ programming when it comes to networks. Could anyone please tell me if C++ would actually be the best language to do this in and also provide some links to places with tutorials.
 

Soulstorm

macrumors 68000
Feb 1, 2005
1,887
1
I also am unable to find any thing on C++ programming when it comes to networks
That's probably because C++ is intended to be cross-platform, but network programming is platform depended. There is no such thing as network documentation on C++. There are only APIs (like Carbon and Cocoa) that will allow you to access the network capabilities of each platform.

Decide what platform you want to program for, then search the documentation available for that particular platform. Xcode has some very nice information about networking on OS X and how to access several aspects of it using the Carbon framework (you should use Carbon, since you will use C++).
 

bronxbomber92

macrumors regular
Nov 23, 2006
109
0
If you want it to be cross platform, the Carbon won't work. I would suggest Java, or maybe Ruby or Python for cross platform networking...
 

userlan667

macrumors newbie
Original poster
Jan 1, 2007
2
0
I dont think Java, Ruby or Python are very good for a professional server/client VOIP program.
 

bousozoku

Moderator emeritus
Jun 25, 2002
16,120
2,397
Lard
If you want it to be cross platform, the Carbon won't work. I would suggest Java, or maybe Ruby or Python for cross platform networking...

Carbon is analogous to the bare Windows API. Most multiple platform applications have been written to hide the system specific APIs as much as possible. While Java works more easily on multiple platforms, it's often not preferable.
 

iancapable

macrumors 6502
Oct 4, 2006
279
0
London, United Kingdom
I dont think Java, Ruby or Python are very good for a professional server/client VOIP program.

Why not? Java is perfectly capable of high performance stuff, including VOIP... It's also easier in the sense that it has built in memory management.

If you think it's still not good enough use GCJ and compile to native code.
 

mbabauer

macrumors regular
Feb 14, 2006
105
0
I also am unable to find any thing on C++ programming when it comes to networks.

By "networks", I assume you mean networking. C++ does not have any networking stuff built-in, just as its parent C did not. Its designed to be modular in the sense that you import the stuff you need. That said, almost all OSes out there have a winsock.h or equivalant. For VOIP work, you may need to go a little more system-level, as I don't think you can do UDP using sockets (I may be wrong...been a long time since I did C++). In any light, depending on the plateform (Windows, OSX, linux, etc) there should be tons of documentation on how to open and close network connections.

If you go the C/C++ route, my suggestion would be develop your communications stuff as a generic library, then use that library on whatever GUI(s) you develop. This way you can write the core systems once and just reuse it over and over.

I dont think Java, Ruby or Python are very good for a professional server/client VOIP program.

I am not sure why you think this, but Java can be used very successfully for client/server anything. I work for a VERY large bank, and we use a lot of Java code for everything from ECommerce, to B2B, to accessing systems of records. One of the nicer things about Java is that it has built in memory management. It also has thousands of plug-in extensions, and I even believe there are some to do VOIP for you.

Given the number of RPC-type protocols out there (SOAP, CORBA, RMI, etc, etc), you could even go so far as to write the server side in C/C++ or something else, and just do the client side in Java. Keep in mind, a socket is a socket is a socket. If you put a byte of data in on one side, its still the same byte on the other.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.