file transfer with remoting

  • Thread starter Thread starter Mirs
  • Start date Start date
M

Mirs

I'm looking for an example of c# code of using remoting for file(very small)
transfer.
Is there any?
Regards
Mirs
 
I'm looking for an example of c# code of using remoting for file(very small)
transfer.
Is there any?

I'm not sure, but it would be really pretty simple (albeit rather
inefficient). Since System.IO.Stream is MarshalByRefObject, you can
open a file as FileStream on one end, pass the Stream object remotely,
and read from it on another end. The inefficiency comes from the fact
that every Read call will be marshalled, so if you do small reads, the
overhead will be greater than effective payload. But for small stuff,
it shouldn't matter much.
 
Back
Top