The Ripple API https://ripple.moe/api/
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.

startuato_windows.go 616B

12345678910111213141516171819202122232425262728293031323334
  1. // +build windows
  2. // The Ripple API on Windows is not officially supported and you're probably
  3. // gonna swear a lot if you intend to use it on Windows. Caveat emptor.
  4. package main
  5. import (
  6. "log"
  7. "net"
  8. "github.com/valyala/fasthttp"
  9. "zxq.co/ripple/rippleapi/common"
  10. )
  11. func startuato(hn fasthttp.RequestHandler) {
  12. conf, _ := common.Load()
  13. var (
  14. l net.Listener
  15. err error
  16. )
  17. // Listen on a TCP or a UNIX domain socket.
  18. if conf.Unix {
  19. l, err = net.Listen("unix", conf.ListenTo)
  20. } else {
  21. l, err = net.Listen("tcp", conf.ListenTo)
  22. }
  23. if nil != err {
  24. log.Fatalln(err)
  25. }
  26. fasthttp.Serve(l, hn)
  27. }