Dear visitor, welcome to QtForum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
Client Server app
Hey guys,
I'm trying to create an app that acts as a server for incoming connnections
and then sends the data packets it receives to another server. So it acts as a client and server all in the same window. I have the sample client app and server app that QT comes with but can't figure out how to combine the two into one app.
Can anyone help me out ?
Thanks
RE: Client Server app
What do you want to combine? Just create a server socket and a client socket and when you get data from the server socket, feed them to your client socket. Use events to poll the events and you're home
Client Server app
okay I'm kinda new at this linux programming thing...is there any sample code out there to do that
RE: Client Server app
When you use Qt, it's not "this linux programming" anymore - you have a crossplatform framework - it is unadvised to use platform dependant code

Check the networking examples that come with Qt (like 'a small client-server example' from the network section -
http://doc.trolltech.com/3.3/clientserver-example.html).
I looked at the client and server examples, but I need a program that both listens for (like server) connections and sends out (like client).
Anyway you can help me ?