22 lines
361 B
Go
22 lines
361 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"io"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
type TelnetClient interface {
|
||
|
Connect() error
|
||
|
io.Closer
|
||
|
Send() error
|
||
|
Receive() error
|
||
|
}
|
||
|
|
||
|
func NewTelnetClient(address string, timeout time.Duration, in io.ReadCloser, out io.Writer) TelnetClient {
|
||
|
// Place your code here.
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// Place your code here.
|
||
|
// P.S. Author's solution takes no more than 50 lines.
|