diff --git a/entropy.go b/entropy.go index eec960f..156c1cd 100644 --- a/entropy.go +++ b/entropy.go @@ -8,6 +8,7 @@ import ( "io" ) +// Entropy defines a entropy source type Entropy interface { Init() Fill(nonce []byte) diff --git a/kcp_test.go b/kcp_test.go index 3242be5..d06b061 100644 --- a/kcp_test.go +++ b/kcp_test.go @@ -33,7 +33,6 @@ func (p *DelayPacket) ts() int32 { return p._ts } func (p *DelayPacket) setts(ts int32) { p._ts = ts } type DelayTunnel struct{ *list.List } -type Random *rand.Rand type LatencySimulator struct { current int32 lostrate, rttmin, rttmax, nmax int diff --git a/sess.go b/sess.go index 0c541b0..0353404 100644 --- a/sess.go +++ b/sess.go @@ -677,12 +677,6 @@ type ( rd atomic.Value // read deadline for Accept() wd atomic.Value } - - // a incoming packet definition - inPacket struct { - from net.Addr - data []byte - } ) // monitor incoming data for all connections of server diff --git a/sess_test.go b/sess_test.go index 18e8c4c..5836fe9 100644 --- a/sess_test.go +++ b/sess_test.go @@ -19,10 +19,8 @@ const portEcho = "127.0.0.1:9999" const portSink = "127.0.0.1:19999" const portTinyBufferEcho = "127.0.0.1:29999" const portListerner = "127.0.0.1:9998" -const salt = "kcptest" var key = []byte("testkey") -var fec = 4 var pass = pbkdf2.Key(key, []byte(portSink), 4096, 32, sha1.New) func init() {