2014-12-29 04:06:09 +00:00
|
|
|
package sshrpc
|
|
|
|
|
2015-05-30 17:25:21 +00:00
|
|
|
import "fmt"
|
2014-12-29 04:06:09 +00:00
|
|
|
|
|
|
|
func ExampleClient_Connect() {
|
|
|
|
|
|
|
|
client := NewClient()
|
|
|
|
client.Connect("localhost:2022")
|
|
|
|
defer client.Close()
|
|
|
|
var reply string
|
|
|
|
err := client.Call("ExampleServer.Hello", "Example Name", &reply)
|
|
|
|
if err != nil {
|
|
|
|
//Handle Error
|
|
|
|
}
|
|
|
|
fmt.Println(reply)
|
|
|
|
}
|