Esempio n. 1
0
 private void ConfigureComputeBytes <TMessage, TRaw>(IWampTransportBinding <TMessage, TRaw> binding)
 {
     if (binding.ComputeBytes == null)
     {
         binding.ComputeBytes = true;
     }
 }
Esempio n. 2
0
        private IWampConnection <TMessage> CreateConnection <TMessage, TRaw>(SocketData connection,
                                                                             IWampTransportBinding <TMessage, TRaw> binding)
        {
            if (binding.ComputeBytes == null)
            {
                binding.ComputeBytes = true;
            }

            return(new RawSocketConnection <TMessage>(connection, binding, mAutoPingInterval));
        }
        private TcpClientConnection <TMessage> CreateConnection <TMessage, TRaw>(RawSocketTcpClient connection, IWampTransportBinding <TMessage, TRaw> binding)
        {
            if (binding.ComputeBytes == null)
            {
                binding.ComputeBytes = true;
            }

            return(new TcpClientConnection <TMessage>
                       (connection.Client,
                       connection.Stream,
                       connection.HandshakeResponse.MaxMessageSizeInBytes,
                       connection.HandshakeRequest,
                       binding,
                       mByteArrayPool,
                       mAutoPingInterval));
        }