Cross language / cross platform questions.
I have a couple questions regarding languages and platforms for a networking application that I would like to make. Let it also be known I know next to nothing about networking in programming. Basically what I would ideally like to do is create a game where the client program is written in C# and the host program is written in a different and cross platform language, such as Java or C++. This so I could run the server on a wide variety of platforms, yet keep the client purely windows based for now. Here are my questions: 1) Is this possible? 2) If possible where can I find information on this? 3) Is it not worth the aggrivation of trying to make a cross platform/cross language server app for a purely window based client?
1) Yes.
2) Read the documentation for the networking APIs you choose to use. Basically you need to develop a protocol that your application uses and then read and write to that protocol on both ends of the program. You can use binary or string based protocols. Just choose something and then try to get both ends to produce the same network traffic.
3) You'll find that most of what you need to do will be pretty similar no matter which platform or language you are using.
2) Read the documentation for the networking APIs you choose to use. Basically you need to develop a protocol that your application uses and then read and write to that protocol on both ends of the program. You can use binary or string based protocols. Just choose something and then try to get both ends to produce the same network traffic.
3) You'll find that most of what you need to do will be pretty similar no matter which platform or language you are using.
Don't forget to use network-order (little endian) for your numeric types.
If both platforms are x86 it's just 'good practice' to do this, but some platforms use little endian. look up htons() htonl() etc. etc.
If both platforms are x86 it's just 'good practice' to do this, but some platforms use little endian. look up htons() htonl() etc. etc.
Winterdyne Solutions Ltd is recruiting - this thread for details!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement