mirror of https://gogs.blitter.com/RLabs/xs
removed hardcoded op 'e' in client demo; hardcoded test server output
This commit is contained in:
parent
9fb9d073ab
commit
ad5366bdfb
|
@ -36,7 +36,6 @@ func main() {
|
||||||
fmt.Println("Err!")
|
fmt.Println("Err!")
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
fmt.Fprintf(conn,"e") // tell server just to echo
|
|
||||||
_, err = io.Copy(conn, os.Stdin)
|
_, err = io.Copy(conn, os.Stdin)
|
||||||
if err != nil && err.Error() != "EOF" {
|
if err != nil && err.Error() != "EOF" {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
|
|
@ -152,7 +152,8 @@ func main() {
|
||||||
*connOp = data[0]
|
*connOp = data[0]
|
||||||
data = data[1:chN]
|
data = data[1:chN]
|
||||||
chN -= 1
|
chN -= 1
|
||||||
|
// Have op here and first block of data[]
|
||||||
|
|
||||||
fmt.Printf("[* connOp '%c']\n", *connOp)
|
fmt.Printf("[* connOp '%c']\n", *connOp)
|
||||||
// The CloseHandler typically handles the
|
// The CloseHandler typically handles the
|
||||||
// accumulated command data
|
// accumulated command data
|
||||||
|
@ -161,6 +162,7 @@ func main() {
|
||||||
authCookie: "c00ki3",
|
authCookie: "c00ki3",
|
||||||
CloseHandler: testCloseHandler,
|
CloseHandler: testCloseHandler,
|
||||||
status: 0}
|
status: 0}
|
||||||
|
conn.Write([]byte("SERVER OUTPUT"))
|
||||||
}
|
}
|
||||||
|
|
||||||
//fmt.Printf("Client sent %s\n", string(data))
|
//fmt.Printf("Client sent %s\n", string(data))
|
||||||
|
|
Loading…
Reference in New Issue