Exemplo n.º 1
0
 private UaTcpDiscoveryClient(EndpointDescription remoteEndpoint)
 {
     this.innerChannel = new UaTcpSecureChannel(new ApplicationDescription {
         ApplicationName = nameof(UaTcpDiscoveryClient)
     }, null, remoteEndpoint);
     this.semaphore = new SemaphoreSlim(1);
 }
Exemplo n.º 2
0
 private UaTcpDiscoveryService(EndpointDescription remoteEndpoint, ILoggerFactory loggerFactory = null, UaTcpSecureChannelOptions options = null)
 {
     this.innerChannel = new UaTcpSecureChannel(new ApplicationDescription {
         ApplicationName = nameof(UaTcpDiscoveryService)
     }, null, remoteEndpoint, loggerFactory, options);
     this.semaphore = new SemaphoreSlim(1);
 }
Exemplo n.º 3
0
        public BinaryDecoder(Stream stream, UaTcpSecureChannel channel = null, bool keepStreamOpen = false)
        {
            if (stream == null)
            {
                throw new ArgumentNullException(nameof(stream));
            }

            this.stream   = stream;
            this.channel  = channel;
            this.encoding = new UTF8Encoding(false, true);
            this.reader   = new BinaryReader(this.stream, this.encoding, keepStreamOpen);
        }