Hello,
I implemented a Stream for transfering data over the network.
On the remote (client) side I have a proxy to a stream object.

Client Code:
Stream stream = remoteserverobject.GetStream();
byte [] buffer = new byte[1024*1024];
stream.Read(buffer,0,1024*1024) ;

The buffer is transferd (1MB) from the client to the server and if the Read
call returns the buffer is transfered back (OK). So the network volumn is
2MB.IMO that's 1MB to much.

The signature for Read is:

[C#]
[Serializable]
public abstract int Read(
   in byte[] buffer,
   int offset,
   int count
);

The buffer parameter is explicitly marked as in. I couldn't understand why.
I think this happens not only for my channel.
Is there any workaround with remoting attributes?
Interop Marshalling Attributes don't work.
The transport is Tcpip with TcpIpChannel.

I tried:
byte [] buffer = new byte[0];
stream.Read(buffer,0,1024*1024) ;

Stream::Read(byte[] buffer...)
{

}


Regards,
Dirk

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to