NamedPipe binary messages RRS feed

  • Question

  • Hello,

    Simple question (details follow) : how to use named pipes, without soap serialization, i just want to have on method and read the byte array myself.

    Few weeks ago, i wrote a service using wcf and web sockets. This service, to deal with non .net software, use a custom binding with a really simple contract :

            [OperationContract(IsOneWay = true, Action = "*")]
            Task Message(System.ServiceModel.Channels.Message message);

    and the callback :

            [OperationContract(IsOneWay = true, Action = "*")]
            Task OnMessage(System.ServiceModel.Channels.Message result);

    In this case, i just read the byte array and deserialize using protobuf.

    I've got another service on the same machine, and i want to improve performence using the protobuf deserializer. This service is already exposed with named pipes (with our former contracts).

    With the new websocket server, and the protobuf serializer, i would like to implement it on the second service. Looking at protobuf endpoint behavior, it seems that they override the XmlObjectSerializer, but it seems that it still use some xml.

    Do anyone have an idea on how to do this ?


    Monday, June 23, 2014 9:12 PM

All replies

  • I don't understand the question.  Which class are you trying to use?  All serialization/deserialization create XML data in a byte[] with a schema built into the XML.  There are a few methods to perform the serialization and deserialization. Two ways are with code, or with Contracts.


    Monday, June 23, 2014 11:57 PM
  • I'm trying to implement a service that does not rely on XML, through named pipes.

    As i mentionned in the question, the web socket server just implement one receive method that takes a Message(System.ServiceModel.Channels) as parameter.

    Tuesday, June 24, 2014 9:40 AM
  • A pipe is a stream class that you should be able to use like any stream.  Normally when you start a process the pipe is stdin and stdout.  Are you trying to attach to an existing process by the process name and get stdin/stdout, or can you define stdin and stdout when you start the process?


    Tuesday, June 24, 2014 11:24 AM
  • I wanted to use WCF, not to implement a named pipe server myself. Is that possible ? using a DuplexChannelFactory ?

    Other issue : WCF NamedPipe binding needs a Soap message envelope verison, is that possible to remove this requirement ?

    Tuesday, June 24, 2014 12:32 PM
  • The link provided uses tcp binding. Moreover, i don't understand what's usefull for me in this article, seems to be a really different problem. Soap will still be used for message envelop and content in the case you linked, right ?
    Tuesday, June 24, 2014 1:33 PM