TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Alex Paluch
NA
1
0
Best threading model in a small chatserver?
Jan 9 2006 8:13 PM
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
Reply
Answers (
2
)
help in Multithreading
How to create Thread per-client in socket programming..