|
-
Nov 11th, 2009, 02:46 AM
#1
Thread Starter
Addicted Member
TCP Receiving/Sending data
Im woundering how does Receiving/Sending data work in a TCPClient/Server that is connected in the same networkstream.
Ps: is there any examples/Tuts?
Thanks!
-
Nov 11th, 2009, 02:56 AM
#2
Addicted Member
Re: TCP Receiving/Sending data
Theres Plently of tutorials out there, as they say happiness is just a google search away :P
http://www.google.co.nz/search?hl=en...meta=&aq=f&oq=
Macuiare
-
Nov 11th, 2009, 03:30 AM
#3
Re: TCP Receiving/Sending data
A NetworkStream is a Stream like any other. You call a Write method to put data in and a Read method to get data out. You can call synchronous methods that will block until the operation is complete, or you can call asynchronous methods that will allow you to keep processing and invoke a callback when the operation completes. Asynchronous methods are particularly useful at the receiving end, where you might be waiting for some time for data. You might like to follow the Asynchronous link in my signature and see my fully asynchronous implementation of a server and client that exchange text message over TCP.
-
Nov 11th, 2009, 04:24 AM
#4
Thread Starter
Addicted Member
Re: TCP Receiving/Sending data
Hum, Is it possible for a tcp listener to Receiving/Sending data like reading the same network stream.
EX: TcpClient send text(Example) to the server. The server then reads it and prints it on a richtextbox. And the server sends text to the client and it reads it but be in the same networkstream.
-
Nov 11th, 2009, 04:31 AM
#5
Re: TCP Receiving/Sending data
 Originally Posted by WhatAmIDoing
Hum, Is it possible for a tcp listener to Receiving/Sending data like reading the same network stream.
EX: TcpClient send text(Example) to the server. The server then reads it and prints it on a richtextbox. And the server sends text to the client and it reads it but be in the same networkstream.
The link that I've already directed you to answers that question.
Last edited by jmcilhinney; Nov 11th, 2009 at 05:43 AM.
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
|