|
-
Apr 30th, 2003, 03:56 AM
#1
Thread Starter
Addicted Member
Client / Server & UDP
Hi,
I am trying to write a simple Client/ Server application. I am using a TcpListener, and a TcpClient with a NetworkStream. I have got as far as connecting a single client to a server app, and my server can read data sent from the client. However, I want my server to send something back to acknowledge the connection - I am confused. Do I need a separate UDP connection or is the fact that a connection has already been established enough? At the client end I am creating a socket to send the data to the server - it keeps on falling over when I try to create a listener socket at the client end waiting for a response.
Can somebody point me to a simple echo style application or something that will help me?
I would be most grateful,
Thanks,
DJ
-
Apr 30th, 2003, 07:32 AM
#2
yay gay
i didnt understand quite all ur question but i am facing a problem in my client/server tcp application..when the server sends data to the client it disconnects.. anyone knows why? was that what u mean?
\m/  \m/
-
Apr 30th, 2003, 03:02 PM
#3
When you accept the connection on the server, you can do it like so...
Code:
TcpClient talkBack = myTcpListener.AcceptTcpClient();
now you have a new TcpClient which can send data from the server to your client the same way your client does. Good luck!
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Apr 30th, 2003, 08:29 PM
#4
yay gay
didnt anyone experience what happened to me? if no maybe its the class i used its stupid..could u share it with me?
tks..
\m/  \m/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|