file transfer with remoting

M

Mirs

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

Pavel Minaev

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top