Forum Moderators: open

Message Too Old, No Replies

Client - Server app. with C++

Is there anyone who has a source code

         

digi_mind

6:03 pm on Nov 4, 2003 (gmt 0)

10+ Year Member



I would like to implement an application in C++. This application should allow two computers to exchange information.

Computer "A" should send a message to computer "B", then computer "B" should read the message and respond to computer "A".

If you have some source code to do this, or if you know any link that could help, please let me know it.

Xoc

8:23 am on Nov 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are a number of ways to do this. You can use TCP/IP or Named Pipes or a web service or DCOM. The first question is, what is the network connecting the two machines? Is it an intranet, with both machines running Windows, or does it have to go over the Internet?

digi_mind

7:52 pm on Nov 5, 2003 (gmt 0)

10+ Year Member



I have two machines, they both run windows xp. The conection should be established through SOCKETS.

aspdaddy

9:39 pm on Nov 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



sounds like yr2 comp science homework :)

digi_mind

10:54 pm on Nov 5, 2003 (gmt 0)

10+ Year Member



I am not doing any homework, I wish it was this simple.
This app. is only a part of a VoIP application, combined with GUIDs, dynamic web sites and a few other topics.

I just do not want to start reading huge books that will end telling me exactly what someone else can in a few lines of source code.

If you know how to create a threaded client server app in c++, then send me the source code or a link.

aspdaddy

1:33 am on Nov 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i have the code in java, i did it in my yr2 at uni :) sockets and threading are very simple in java.

You need 3 classes client, server, clientthread. If there are no simple documented examples, then it might be a good sign to use another language.

f00sion

11:21 pm on Nov 7, 2003 (gmt 0)

10+ Year Member



Ive got server socket code at home that I actually did write for a cs project..it gets pretty complicated because of the multi threading, would your app only need to accept a connection on 1 socket at a time?