DotNetty icon indicating copy to clipboard operation
DotNetty copied to clipboard

File Transfer

Open battermaster opened this issue 7 years ago • 7 comments
trafficstars

Is there any File Transfer examples ?

battermaster avatar Jan 25 '18 08:01 battermaster

up

zzlover avatar Apr 17 '18 07:04 zzlover

up

sunriseyuen avatar Apr 29 '18 01:04 sunriseyuen

Example about multipart/form-data upload? I can write basic example.

hey-red avatar Apr 29 '18 09:04 hey-red

How about an example where two TCP nodes stream a file between them? Doesn't seem to be supported very well...

aronweiler avatar Jul 03 '18 18:07 aronweiler

up

haoljp avatar Dec 22 '19 07:12 haoljp

_bootStrap
                    .Group(_group)
                    .Channel<TcpSocketChannel>()
                    .Handler(new ActionChannelInitializer<ISocketChannel>(channel =>
                    {
                        IChannelPipeline pipeline = channel.Pipeline;
                        pipeline.AddLast("filewriter", new ChunkedWriteHandler<IByteBuffer>());
                         ...
                    }));

var stream=new MemoryStream();
var chunkedStream= new  ChunkedStream(new MemoryStream());
 _channel.WriteAndFlushAsync(chunkedStream);

but if the stream is FileStream ,it will cause a deadlock ! you can define a new type of ChunkedStream ,to fix this bug. https://github.com/cocosip/FastDFSCore/blob/master/src/FastDFSCore/Client/DotNetty/FixChunkedStream.cs

cocosip avatar Mar 18 '20 05:03 cocosip

Simple full example would be really useful.

TailyFair avatar Sep 29 '20 16:09 TailyFair