Open battermaster opened 6 years ago
up
up
Example about multipart/form-data upload? I can write basic example.
How about an example where two TCP nodes stream a file between them? Doesn't seem to be supported very well...
up
_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
Simple full example would be really useful.
Is there any File Transfer examples ?