implement the TLS Cookie extension

This commit is contained in:
Marten Seemann
2017-09-21 13:15:36 +07:00
parent 085702df36
commit df13a0a970
7 changed files with 124 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ package handshake
import (
"bytes"
"net"
"github.com/lucas-clemente/quic-go/internal/protocol"
. "github.com/onsi/ginkgo"
@@ -62,4 +63,10 @@ var _ = Describe("Fake Conn", func() {
Expect(stream.Bytes()).To(Equal([]byte("foobar")))
})
})
It("returns its remote address", func() {
addr := &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 1337}
c.remoteAddr = addr
Expect(c.RemoteAddr()).To(Equal(addr))
})
})