2
0
mirror of https://github.com/soheilhy/cmux.git synced 2026-08-04 07:59:24 +08:00

SetReadDeadline for Matching

This commit is contained in:
Andreas Jaekle
2016-09-05 19:56:50 +02:00
parent b26951527b
commit e132036cce
4 changed files with 120 additions and 13 deletions

View File

@@ -20,6 +20,7 @@ import (
"net"
"sync"
"testing"
"time"
"golang.org/x/net/http2"
)
@@ -43,6 +44,10 @@ func (c *mockConn) Read(b []byte) (n int, err error) {
return c.r.Read(b)
}
func (c *mockConn) SetReadDeadline(time.Time) error {
return nil
}
func discard(l net.Listener) {
for {
if _, err := l.Accept(); err != nil {