コード例 #1
0
 public PeerTest(BufLen nonce, BufLen aliceip, BufLen aliceport, BufLen introkey)
 {
     TestNonce       = nonce;
     AliceIPAddrSize = BufUtils.To8BL((byte)aliceip.Length);
     AliceIPAddr     = aliceip;
     AlicePort       = aliceport;
     IntroKey        = introkey;
 }
コード例 #2
0
        public PeerTest(BufLen nonce, IPAddress aliceip, int aliceport, BufLen introkey)
        {
            TestNonce = nonce;
            var ab = aliceip.GetAddressBytes();

            AliceIPAddrSize = BufUtils.To8BL((byte)ab.Length);
            AliceIPAddr     = new BufLen(ab);
            AlicePort       = BufUtils.Flip16BL((ushort)aliceport);
            IntroKey        = introkey;
        }