[Mono-dev] .NET Remoting: Upload of a file from a Win32 MS .NET client to a Linux Mono .NET server.

Sunny sloncho at gmail.com
Mon Sep 5 22:58:54 EDT 2005


On 9/5/05, Yngve Zackrisson <yngve.zackrisson at mobila-kontoret.se> wrote:
> On Fri, 2005-09-02 at 23:15, Sunny wrote:
> > Sorry, replied off the list, here is a copy:
> >
> >
> 
> Not sure you got it right.
> I want to upload data (transfer a file from the client to the server).

It does not matter. If you have a remoting call, and you pass a Stream
over, the Stream.Read method will pass the buffer in both directions,
so you will double the traffic.
In your case, I would make my server method to look like:

public void UploadFileChunk(byte[] buffer)
{
       //add this byte array to FileOut ...
}

And from the client .... just loop through your fileIn, sending chunks
to the  server and update your progress bar in the loop.

> 
> >
> > This is a good article on the topic:
> > http://www.genuinechannels.com/Content.aspx?id=23&type=1
> >
> 
> I had a refferens to that in my post :-).

Sorry, I did not read it. And still can not find it. Anyway ...

> I gona test the approach suggested by Robert Jordan.
> It is similar to your approach.
> 
> Tanks
> 
> Yngve Zackrisson.
> 

--
Svetoslav Milenov (Sunny)



More information about the Mono-devel-list mailing list