473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Looking for information about TCP connections

Airslash
221 100+
Hello,

me and 2 fellow students are busy working on our endterm project at school. The assignment consists of a cross platform multimedia application (a game in our project) that can be compiled on Windows, Linux or Apple.

We have extended our client to have online capababilities, but I'm having trouble finding decent information about making cross platform TCP or UDP connections to a server. I know there is SDL_NET to use as it's a good cross platform library, but I was hoping someone knows a good online resource regarding the creation of UDP/TCP connections. I know the word socket comes to mind, but this is always platform specific...

So I hope someone can provide a good resource site where they explain sockets for each platform so that we are able to create our own little lib to send text messages to the server.
Jan 30 '08 #1
3 1733
gpraghuram
1,275 Expert 1GB
Hello,

me and 2 fellow students are busy working on our endterm project at school. The assignment consists of a cross platform multimedia application (a game in our project) that can be compiled on Windows, Linux or Apple.

We have extended our client to have online capababilities, but I'm having trouble finding decent information about making cross platform TCP or UDP connections to a server. I know there is SDL_NET to use as it's a good cross platform library, but I was hoping someone knows a good online resource regarding the creation of UDP/TCP connections. I know the word socket comes to mind, but this is always platform specific...

So I hope someone can provide a good resource site where they explain sockets for each platform so that we are able to create our own little lib to send text messages to the server.
Mostly you endp up with problems if you use OS specific socket calls.
like using winsock calls and using it on Linux.
But if you want to make cross platform tcp connection you should use AF_INET protocol family and try to use only generic calls instead of OS specific calls.
Following calls works on windows/linux
socket()
bind()
listen()
accept()
read()
write()
select()
shutdown()
close()

Hope this helps you

Raghuram
Jan 30 '08 #2
Airslash
221 100+
Mostly you endp up with problems if you use OS specific socket calls.
like using winsock calls and using it on Linux.
But if you want to make cross platform tcp connection you should use AF_INET protocol family and try to use only generic calls instead of OS specific calls.
Following calls works on windows/linux
socket()
bind()
listen()
accept()
read()
write()
select()
shutdown()
close()

Hope this helps you

Raghuram
Definitly, just wondering if specific headers are required to perform these calls, or they all have to be defined from scratch. I mean is there a base class I can work with in C++ and write a sort of wrapper around it, or do I need to make it all from scratch ?
Jan 30 '08 #3
arnaudk
424 256MB
A couple come to mind, have a look at C++ Sockets (lightweight), or ACE (heavyweight).
Jan 30 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Harry Koh | last post by:
I would like to benchmark some scripts by - measuring the time a page loads - counting the number of connections to MySQL by page - ... So that, i'm looking for a software beside Apache (for...
3
by: Mudge | last post by:
Hi, My hosting provider only allows me to use 50 connections to my MySQL database that my Web site will use. I don't know what this 50 connections means exactly. Does this mean that only 50...
1
by: aplaton101 | last post by:
What is the best way to create a TCP Server which receives connections from several sockets and stores information that will be used for the next connection from each of the sockets. How can I...
1
by: Cremoni | last post by:
I'm looking for a visual scripting language to write poker logic. There must be several things out there, but I haven't been able to find anything suitable. I've seen similar systems in the past. I...
2
by: A. User | last post by:
Hello, Where does the ODBC Data Source Admin tool store the connection information for User, System or File DSNs? A coworker created/used several ODBC connections on his machine, we backed up...
1
by: TahoeKid | last post by:
Not sure where to post this, so I'll start here. I'm looking for an SDK for commercial product that can be used to create a program that creates drawing objects with line connections, and that it...
4
by: Kosmos | last post by:
Hey guys...as a relatively new programmer, I try to give back where I can. Below is the code for a useful program I believe many of you could use...just don't use the same exact code because...well I...
3
by: =?Utf-8?B?SGVybWFuIEpvbmVz?= | last post by:
.. . . that allows me to drag and drop shortcuts on to a form. It should be able to launch the application when the icon is double-clicked. Is there such a control in Visual Studio 2005? Are...
20
by: ram.rachum | last post by:
Hey, I'm looking for a good Python environment. That is, at least an editor and a debugger, and it should run on Windows. Does anyone have any idea?
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.