Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Controller ¶
type Controller struct { Conn *telnet.Conn ResponseStream chan string }
The Controller struct
func NewReciveController ¶
func NewReciveController(dest, selftype string) (*Controller, error)
Create a new controller that automatically revices and dumps content to the ResponseStream channel in Controller selftype is the first thing send my client to identify
func (*Controller) Exec ¶
func (c *Controller) Exec(cmd string) ([]string, error)
writes cmd and returns when reciving response
func (*Controller) ReadToChannel ¶
func (c *Controller) ReadToChannel(b byte)
reads until b, then sends response to ResponseStream channel
Click to show internal directories.
Click to hide internal directories.