Re: Stream Question



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


.



Relevant Pages

  • Re: How long should it take to re-install SBS 2003 & updates?
    ... your scope of work IN WRITING and signed by the client, ... The three times I have felt sorry for a client, I have, ... external floppy and DVD-R/-RW drives for the server. ...
    (microsoft.public.windows.server.sbs)
  • Writing a windows service with a socket interface.
    ... I'm writing a windows service that is accessible via sockets. ... and sends a response back to the client. ... Are there any good resources on writing windows services with socket ... Or perhaps if the IP address of the server was modified while the ...
    (microsoft.public.dotnet.framework)
  • Re: How to protect Python source from modification
    ... > I am writing a multi-user accounting/business system. ... > a database ... > The client program contains all the authentication and business logic. ... Write a socket server program that runs on the server. ...
    (comp.lang.python)
  • Re: Stream Question
    ... 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? ... 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... ...
    (microsoft.public.dotnet.framework.compactframework)
  • Security between client and server
    ... I am writing a network client and server where I'd like to "scramble" the ... One of the headaches I have is that the client I'm ... a proxy server could be made which runs between the client ...
    (sci.crypt)

Loading