func sendRequest(s *gotalk.Sock) { fmt.Printf("requestor: sending 'echo' request\n") b, err := s.BufferRequest("echo", []byte("Hello")) if err == gotalk.ErrTimeout { fmt.Printf("requestor: timed out\n") } else if err != nil { fmt.Printf("requestor: error %v\n", err.Error()) } else { fmt.Printf("requestor: success: %v\n", string(b)) } }