We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can you help me understand why I'm not getting any output after the send?
I have these two programs running in different terminals on the same host.
Listener
func main() { if len(os.Args) != 2 { panic("ahhh") } address := os.Args[1] port, err := strconv.Atoi(address) check(err) port16 := uint16(port) listener, err := noise.NewNode(noise.WithNodeBindPort(port16)) check(err) defer listener.Close() listener.Handle(func(ctx noise.HandlerContext) error { if !ctx.IsRequest() { return nil } fmt.Printf("Got a message: '%s'\n", string(ctx.Data())) return ctx.Send([]byte("Hi")) }) check(listener.Listen()) fmt.Println("listening on", listener.Addr()) }
Sender
func main() { if len(os.Args) != 2 { panic("ahhh") } address := os.Args[1] sender, err := noise.NewNode() check(err) defer sender.Close() check(sender.Listen()) check(sender.Send(context.TODO(), address, []byte("Hi Bob!"))) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Can you help me understand why I'm not getting any output after the send?
I have these two programs running in different terminals on the same host.
Listener
Sender
The text was updated successfully, but these errors were encountered: