func NoiseListenAsync(doneChan chan bool, privkey *koblitz.PrivateKey, rpc1 *OpencxAuctionRPC, host string, port uint16) {
	var err error

	// Start noise rpc server (need to do this since the client is a rpc newclient)
	noiseRPCServer := rpc.NewServer()

	logging.Infof("Registering RPC API over Noise protocol ...")
	// Register rpc
	if err = noiseRPCServer.Register(rpc1); err != nil {
		logging.Fatalf("Error registering RPC Interface:\n%s", err)
	}

	logging.Infof("Starting RPC Server over noise protocol")
	// Start RPC Server
	var listener net.Listener
	if listener, err = cxnoise.NewListener(privkey, int(port)); err != nil {
		logging.Fatal("listen error:", err)
	}
	logging.Infof("Running RPC-Noise server on %s\n", listener.Addr().String())

	// We don't need to do anything fancy here either because the noise protocol
	// is built in to the listener as well.
	go noiseRPCServer.Accept(listener)
	OffButtonCloseListener(rpc1, listener)
	doneChan <- true
	return
}
// NoiseListenAsync listens on socket host and port
NoiseListenAsync listens on socket host and port
// NoiseListenAsync listens on socket host and port
func NoiseListenAsync(doneChan chan bool, privkey *koblitz.PrivateKey, rpc1 *OpencxAuctionRPC, host string, port uint16) {
	var err error
	noiseRPCServer := rpc.NewServer()
	logging.Infof("Registering RPC API over Noise protocol ...")
	if err = noiseRPCServer.Register(rpc1); err != nil {
		logging.Fatalf("Error registering RPC Interface:\n%s", err)
	}
	logging.Infof("Starting RPC Server over noise protocol")
	var listener net.Listener
	if listener, err = cxnoise.NewListener(privkey, int(port)); err != nil {
		logging.Fatal("listen error:", err)
	}
	logging.Infof("Running RPC-Noise server on %s\n", listener.Addr().String())
	go noiseRPCServer.Accept(listener)
	OffButtonCloseListener(rpc1, listener)
	doneChan <- true
	return
}
func NoiseListenAsync ( doneChan chan bool , privkey * koblitz . PrivateKey , rpc1 * OpencxAuctionRPC , host string , port uint16 ) { var err error noiseRPCServer := rpc . NewServer ( ) logging . Infof ( " " ) if err = noiseRPCServer . Register ( rpc1 ) ; err != nil { logging . Fatalf ( " \n " , err ) } logging . Infof ( " " ) var listener net . Listener if listener , err = cxnoise . NewListener ( privkey , int ( port ) ) ; err != nil { logging . Fatal ( " " , err ) } logging . Infof ( " \n " , listener . Addr ( ) . String ( ) ) go noiseRPCServer . Accept ( listener ) OffButtonCloseListener ( rpc1 , listener ) doneChan <- true return }
NoiseListenAsync listens on socket host and port
NoiseListenAsync listens on socket host and port
// Start noise rpc server (need to do this since the client is a rpc newclient) // Register rpc // Start RPC Server // We don't need to do anything fancy here either because the noise protocol // is built in to the listener as well.