-
-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
It is not possible now to declare a method returning Stream, e.g.
public interface IComputingService
{
Stream GetBigFile();
}
In my use case machines need to transmit big index files between each other, and the file size can be up to 4 GB. There is no possibility to create a byte array more than 2GB. Even if it would be possible, it's undesirable to copy the whole file to memory of both sides of a communication channel.
When using WCF, streamed transmission mode can be used to achieve that. Here is an example of NetTcpBinding configuration:
private static Binding GetBinding()
{
var binding = WcfHelper.GetNetTcpBinding();
// Expand properties to allow the transfer of bigger files (> 100MB)
var netTcpBinding = binding as NetTcpBinding;
if (netTcpBinding != null)
{
netTcpBinding.TransferMode = TransferMode.Streamed;
netTcpBinding.MaxReceivedMessageSize = Configuration.Instance.MaxSizeOfIndexFileInBytes;
}
binding.ReceiveTimeout = TimeSpan.FromMinutes(60);
binding.SendTimeout = TimeSpan.FromMinutes(60);
return binding;
}
It would be nice to have the same feature in the IpcServiceFramework.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed