Пример #1
0
 /// <summary>
 /// Event arguments for UDP datagram events.
 /// </summary>
 /// <param name="DtlsOverUdp">DTLS over UDP class.</param>
 /// <param name="RemoteEndpoint">Remote endpoint.</param>
 /// <param name="Successful">If operation concluded successfully.</param>
 /// <param name="State">State object passed in original call.</param>
 public UdpTransmissionEventArgs(DtlsOverUdp DtlsOverUdp, IPEndPoint RemoteEndpoint,
                                 bool Successful, object State)
     : base(DtlsOverUdp, RemoteEndpoint)
 {
     this.successful = Successful;
     this.state      = State;
 }
Пример #2
0
 public override void Dispose()
 {
     if (!(this.Dtls is null))
     {
         this.Dtls.Dispose();
         this.Dtls = null;
     }
 }
Пример #3
0
 public override void Dispose()
 {
     if (this.Dtls != null)
     {
         this.Dtls.Dispose();
         this.Dtls = null;
     }
 }
Пример #4
0
        public void TestInitialize()
        {
            this.sniffer = new TextWriterSniffer(Console.Out, BinaryPresentationMethod.Hexadecimal);

            //this.remoteEndpoint = new IPEndPoint(Dns.GetHostAddresses("vs0.inf.ethz.ch")[0], 5684);
            //this.remoteEndpoint = new IPEndPoint(Dns.GetHostAddresses("californium.eclipse.org")[0], 5684);
            this.remoteEndpoint = new IPEndPoint(Dns.GetHostAddresses("leshan.eclipse.org")[0], 5684);
            //this.remoteEndpoint = new IPEndPoint(Dns.GetHostAddresses("lsys-home.dyndns.org")[0], 5684);

            this.udpClient   = new UdpClient(5684, AddressFamily.InterNetwork);
            this.dtlsOverUdp = new DtlsOverUdp(this.udpClient, DtlsMode.Client, null, null, this.sniffer);
        }
Пример #5
0
        public void TestCleanup()
        {
            if (this.dtlsOverUdp != null)
            {
                this.dtlsOverUdp.Dispose();
                this.dtlsOverUdp = null;
            }

            if (this.udpClient != null)
            {
                this.udpClient.Dispose();
                this.udpClient = null;
            }

            this.sniffer = null;
        }
Пример #6
0
 /// <summary>
 /// Event arguments for UDP datagram events.
 /// </summary>
 /// <param name="DtlsOverUdp">DTLS over UDP class.</param>
 /// <param name="RemoteEndpoint">Remote endpoint.</param>
 /// <param name="Datagram">Datagram.</param>
 public UdpDatagramEventArgs(DtlsOverUdp DtlsOverUdp, IPEndPoint RemoteEndpoint,
                             byte[] Datagram)
     : base(DtlsOverUdp, RemoteEndpoint)
 {
     this.datagram = Datagram;
 }
Пример #7
0
 /// <summary>
 /// Event arguments for UDP datagram events.
 /// </summary>
 /// <param name="DtlsOverUdp">DTLS over UDP class.</param>
 /// <param name="RemoteEndpoint">Remote endpoint.</param>
 public UdpEventArgs(DtlsOverUdp DtlsOverUdp, IPEndPoint RemoteEndpoint)
 {
     this.dtlsOverUdp    = DtlsOverUdp;
     this.remoteEndpoint = RemoteEndpoint;
 }