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
nick van Alst
NA
9
0
loop time
Nov 18 2008 1:03 PM
hello,
i'm having the following problem with my application:
i need to check it for incomming tcp requests, but it get stuck if there aren't any of them. i need something to stop the loop after 5 seconds.
this is my code:
while (true)
{
Console.Write("Waiting for a connection... ");
TcpClient client = server.AcceptTcpClient(); <-- here it just waits till there is someone who wants to connect.
Console.WriteLine("Connected!");
}
how can i solve this??
i know i need to do somehing with the while but what??
thx!!
Nick
Reply
Answers (
1
)
Generic Weak dictionary
Making a POST request in UTF8 encoding