You are not logged in.

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.

NeedyoHelp

Unregistered

1

Tuesday, July 13th 2004, 3:42pm

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

  • "wysota" is male

Posts: 4,276

Location: Warsaw, POLAND

  • Send private message

2

Tuesday, July 13th 2004, 4:20pm

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 :)

NeedyoHelp

Unregistered

3

Tuesday, July 13th 2004, 4:47pm

Client Server app

okay I'm kinda new at this linux programming thing...is there any sample code out there to do that

  • "wysota" is male

Posts: 4,276

Location: Warsaw, POLAND

  • Send private message

4

Tuesday, July 13th 2004, 4:52pm

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).

NeadyoHelp

Unregistered

5

Tuesday, July 13th 2004, 5:07pm

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 ?