Click here to Skip to main content
15,891,607 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to create dynamic rectangle on window form? Pin
Mazdak1-Jan-04 22:50
Mazdak1-Jan-04 22:50 
AnswerRe: How to create dynamic rectangle on window form? Pin
Colin Angus Mackay1-Jan-04 22:57
Colin Angus Mackay1-Jan-04 22:57 
GeneralControl development quesions Pin
Den2Fly1-Jan-04 22:05
Den2Fly1-Jan-04 22:05 
GeneralRe: Control development quesions Pin
Mazdak1-Jan-04 22:45
Mazdak1-Jan-04 22:45 
GeneralRe: Control development quesions Pin
Heath Stewart2-Jan-04 5:28
protectorHeath Stewart2-Jan-04 5:28 
GeneralRe: Control development quesions Pin
Mazdak2-Jan-04 6:11
Mazdak2-Jan-04 6:11 
GeneralRe: Control development quesions Pin
Heath Stewart2-Jan-04 6:47
protectorHeath Stewart2-Jan-04 6:47 
GeneralRe: Control development quesions Pin
Mazdak2-Jan-04 7:23
Mazdak2-Jan-04 7:23 
GeneralRe: Control development quesions Pin
Heath Stewart2-Jan-04 9:03
protectorHeath Stewart2-Jan-04 9:03 
GeneralRe: Control development quesions Pin
Mazdak2-Jan-04 9:52
Mazdak2-Jan-04 9:52 
GeneralRe: Control development quesions Pin
Heath Stewart2-Jan-04 10:05
protectorHeath Stewart2-Jan-04 10:05 
GeneralRe: Control development quesions Pin
Mazdak2-Jan-04 10:26
Mazdak2-Jan-04 10:26 
QuestionRSS in these messageborads??? Pin
Mohsen Sajjadi1-Jan-04 21:24
Mohsen Sajjadi1-Jan-04 21:24 
AnswerRe: RSS in these messageborads??? Pin
Colin Angus Mackay1-Jan-04 22:16
Colin Angus Mackay1-Jan-04 22:16 
AnswerRe: RSS in these messageborads??? Pin
Heath Stewart2-Jan-04 5:19
protectorHeath Stewart2-Jan-04 5:19 
GeneralNot sure? Help! Pin
Member 7957781-Jan-04 17:58
Member 7957781-Jan-04 17:58 
GeneralRe: Not sure? Help! Pin
Colin Angus Mackay1-Jan-04 22:11
Colin Angus Mackay1-Jan-04 22:11 
QuestionC# StreamReader blocks ? Pin
Luther Baker1-Jan-04 11:26
Luther Baker1-Jan-04 11:26 
AnswerRe: C# StreamReader blocks ? Pin
Colin Angus Mackay1-Jan-04 11:53
Colin Angus Mackay1-Jan-04 11:53 
GeneralRe: C# StreamReader blocks ? Pin
Luther Baker1-Jan-04 19:22
Luther Baker1-Jan-04 19:22 
GeneralC# select equivalent Pin
Luther Baker1-Jan-04 11:20
Luther Baker1-Jan-04 11:20 
GeneralRe: C# select equivalent Pin
Heath Stewart2-Jan-04 5:12
protectorHeath Stewart2-Jan-04 5:12 
GeneralRe: C# select equivalent Pin
Luther Baker2-Jan-04 7:58
Luther Baker2-Jan-04 7:58 
You are right - but the specific TAIL functionality that I'm trying to implement is the continuous monitoring of a file. For example, as the webserver appends to the log file, I want the new text to appear on the screen.

Originally, I was using ReadLine but it seems to drop the first 4 chars of every read. I started Reading a byte at a time to be more explicit. I am currently using the buffer version of Read (as you suggest, I do in fact, need to differentiate unix and win32 newlines).

So - I am currently spawning a Thread, echoing the entire file to a TextBox, and then sleeping for 1 second. I then try to Read again. Instead of manually polling the file every second, I was wondering if there was a "select" style call that would BLOCK until some event happens to the file (new text was added to the file).

I thought about using ReadBlock, but it seems to return when it reaches the end of the data in the file. I need it to BLOCK if it can't read any more data in - not return. Maybe I'm doing something wrong.

Or, maybe I'm doing it the correct way already. I'll take a look at an open source impl of tail.

Many Thanks,

-Luther
GeneralRe: C# select equivalent Pin
Heath Stewart2-Jan-04 9:06
protectorHeath Stewart2-Jan-04 9:06 
GeneralRe: C# select equivalent Pin
Luther Baker2-Jan-04 10:19
Luther Baker2-Jan-04 10:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.