Hello,
i'm implementig a small chat server to learn sockets and thread programming. the chat server will use tcp as connection model (using tcplistener / tcpclient). As there will be several clients connected to the server, i will have to implement some multithreading model.
question: will asynchronous calls to Networkstream.BeginReceive() do the job? What happens if BeginReceive was called and I start a simultaneous sending transmission on the same socket?
Or will it be better to use the Synchronous Method Networkstream.Receive in a method which is being called a a seperate thread? Would the BackgroundWorker Class be a good solution? (Never used it).
Thanks for any help!
Cheers, alex
Loading
Adam SmithPosted Jan 9, 2006, 11:40 PM
http://haacked.com/archive/2004/08/06/882.aspx
Adam SmithPosted Jan 9, 2006, 11:38 PM
This site's article on the subject is very interesting.
http://haacked.com/archive/2004/08/10/895.aspx