Re: Asynchronous Serial port
Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance
shayke via DotNetMonster.com wrote:
> am i doing something wrong?
> can't i work asynchronically?
> do i have to lock the stream or the port or the buffer itself?
In general, all .NET read primitives can read less bytes than "requested".
If bytes are not arriving fast the async read operation *should* return
a number of bytes less than BytesToRead.
If you need to wait until a certain number of bytes have arrived you
must copy those bytes into a buffer yourself and signal an event when
it's full.
--
Helge Jensen
mailto:helge.jensen@xxxxxxx
sip:helge.jensen@xxxxxxx
-=> Sebastian cover-music:
http://ungdomshus.nu <=-
.
Relevant Pages
- Re: I/O buffering
... StreamReader also buffers data? ... so they buffer as well. ... Neither StreamReader nor StreamWriter inherit from FileStream. ... What StreamReader and StreamWriter _do_ use is any Stream instance. ... (microsoft.public.dotnet.languages.csharp) - Re: Assembly conversion to Pocket Pc format
... But in my case it is throwing exception before executing that statement what ... That is before reading buffer size it is throwing ... Stream respStream = resp.GetResponseStream; ... upload and download files in compact framework. ... (microsoft.public.dotnet.framework.compactframework) - Re: scanf() quesion?
... characters are intended to ... When a stream is fully buffered, ... when a buffer is filled. ... If standard output refers to an interactive device, ... (comp.lang.c) - Re: I/O buffering
... classes (those with word Buffer in their name)? ... Stream class. ... One would not normally use BufferedStream with a FileStream, ... explicitly dispose your custom Stream class, when you were sure you were ... (microsoft.public.dotnet.languages.csharp) - Re: WMS source changing issue
... we use 5 second buffer in WMP. ... The question is - why the server is stopping broadcasting for a while (it ... clearly seen in network statistic in Task Manager) when switching to file ... We're streaming one 5Mbps live stream and one 5Mbps CBR file periodically so ... (microsoft.public.windowsmedia.server) |
|