You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
445 B

  1. package main
  2. import (
  3. "flag"
  4. . "github.com/tendermint/go-common"
  5. "github.com/tendermint/tmsp/example/dummy"
  6. "github.com/tendermint/tmsp/server"
  7. )
  8. func main() {
  9. addrPtr := flag.String("addr", "tcp://0.0.0.0:46658", "Listen address")
  10. flag.Parse()
  11. // Start the listener
  12. _, err := server.NewServer(*addrPtr, dummy.NewDummyApplication())
  13. if err != nil {
  14. Exit(err.Error())
  15. }
  16. // Wait forever
  17. TrapSignal(func() {
  18. // Cleanup
  19. })
  20. }