add local/remote to testsocket
This commit is contained in:
@@ -15,6 +15,8 @@ type testCodec struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type testSocket struct {
|
type testSocket struct {
|
||||||
|
local string
|
||||||
|
remote string
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestCodecWriteError simulates what happens when a codec is unable
|
// TestCodecWriteError simulates what happens when a codec is unable
|
||||||
@@ -87,6 +89,14 @@ func (c *testCodec) String() string {
|
|||||||
return "string"
|
return "string"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s testSocket) Local() string {
|
||||||
|
return s.local
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s testSocket) Remote() string {
|
||||||
|
return s.remote
|
||||||
|
}
|
||||||
|
|
||||||
func (s testSocket) Recv(message *transport.Message) error {
|
func (s testSocket) Recv(message *transport.Message) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user