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
452 B

9 years ago
  1. package main
  2. import (
  3. "flag"
  4. . "github.com/tendermint/go-common"
  5. "github.com/tendermint/tmsp/example/golang"
  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.StartListener(*addrPtr, example.NewDummyApplication())
  13. if err != nil {
  14. Exit(err.Error())
  15. }
  16. // Wait forever
  17. TrapSignal(func() {
  18. // Cleanup
  19. })
  20. }