ooni-probe-cli/internal/engine/experiment/ndt7/wsconn.go
Simone Basso 3265bc670a
refactor(ndt7): use netxlite rather than netx (#768)
This diff required us to move some code around, but no major
change actually happened, except better tests.

While there, I also slightly refactored ndt7's implementation and
removed the ProxyURL setting, which was actually unused.

See https://github.com/ooni/probe/issues/2121
2022-05-30 23:14:07 +02:00

18 lines
336 B
Go

package ndt7
import (
"io"
"time"
"github.com/gorilla/websocket"
)
// weConn is the interface of gorilla/websocket.Conn
type wsConn interface {
NextReader() (int, io.Reader, error)
SetReadDeadline(time.Time) error
SetReadLimit(int64)
SetWriteDeadline(time.Time) error
WritePreparedMessage(*websocket.PreparedMessage) error
}