How to do a non-waiting write on a named pipe (c#)?

后端 未结 1 1136
借酒劲吻你
借酒劲吻你 2021-01-27 13:25

I\'m using .net 3.5 named pipes and my server side is :

serverPipeStream = new NamedPipeServerStream(\"myPipe\", PipeDirection.InOut, 1, PipeTransmissionMode.Byt         


        
相关标签:
1条回答
  • 2021-01-27 14:16

    The problem is BinaryWriter doesn't have a BeginWrite function so, as suggested here, you could write to a MemoryStream and then use the its buffer to pass to the BeginWrite function of the pipe.

    Hope that helps.

    0 讨论(0)
提交回复
热议问题