Re: Stream Question
- From: Simon Hart [MVP] <srhartone@xxxxxxxxx>
- Date: Tue, 14 Apr 2009 05:33:01 -0700
It sounds like you are over complicating this somewhat. The server should not
be writing to an incoming data stream at the same time as receiving it. By
default Read and write both block until the data is received anyway.
The server will receive the data once the Write operation has finished.
I must say I use the Socket class because it gives me greater control how
things are done.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://www.simonrhart.com
"Sven Rutten" wrote:
A bit complicated what I've written..
The question is, if I have a stream (tcp-client/server) and I am writing to
it at the client, and at the same moment the server is writing also to the
stream, while the client is still writing, will the asynchron reader receive
the bytes on the client site immediatly or after that the client has
finished writing to the stream?
Actually we are sending a file like that with 50K-buffers, and the "Pings"
we are sending from the server to the client are received after the whole
file got transmitted!
But only if I am using Activesync and Release-mode, if I'm on Debug it is
working sometimes!
"Sven Rutten" <s@xxx> schrieb im Newsbeitrag
news:urK0eWFvJHA.1300@xxxxxxxxxxxxxxxxxxxxxxx
Hello
We're having a problem using TCPClient/Server. Everything is working ok
with asynchron readers on both ends.
But when we are writing from one side a lot to the stream (but in
50K-Buffers and 100ms sleep between writing!), and in the same time we are
writing some "pings" from the other side to the stream, the pings dont
reach the other side until all the parts (e.g. we are writing 1 MB in 20 x
50KB-buffer) are written to the stream...
How is that possible? It is not happening when we are connected using
WLAN, then everything works ok, but if we are connected over ActiveSync,
the described problem is happening...
Is this a limitation in ActiveSync?
if we are using Sleeps of 4000ms, then it is working (but not really
usable...)
Thanks
Sven
- References:
- Stream Question
- From: Sven Rutten
- Re: Stream Question
- From: Sven Rutten
- Stream Question
- Prev by Date: GPS Question
- Next by Date: Re: IP address that the handheld currently has
- Previous by thread: Re: Stream Question
- Next by thread: Reading Binary SMS in windows mobile 5 using mapirule
- Index(es):
Relevant Pages
|
Loading