fix compile error
This commit is contained in:
parent
26f4e49f05
commit
72f05486f8
14
cmd/gost/vendor/github.com/ginuerzh/gost/kcp.go
generated
vendored
14
cmd/gost/vendor/github.com/ginuerzh/gost/kcp.go
generated
vendored
@ -14,8 +14,6 @@ import (
|
||||
"gopkg.in/xtaci/smux.v1"
|
||||
"net"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -250,18 +248,6 @@ func snmpLogger(path string, interval int) {
|
||||
}
|
||||
}
|
||||
|
||||
func kcpSigHandler() {
|
||||
ch := make(chan os.Signal, 1)
|
||||
signal.Notify(ch, syscall.SIGUSR1)
|
||||
|
||||
for {
|
||||
switch <-ch {
|
||||
case syscall.SIGUSR1:
|
||||
glog.V(LINFO).Infof("[kcp] SNMP: %+v", kcp.DefaultSnmp.Copy())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type KCPSession struct {
|
||||
conn net.Conn
|
||||
session *smux.Session
|
||||
|
5
cmd/gost/vendor/github.com/ginuerzh/gost/signal.go
generated
vendored
Normal file
5
cmd/gost/vendor/github.com/ginuerzh/gost/signal.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// +build windows
|
||||
|
||||
package gost
|
||||
|
||||
func kcpSigHandler() {}
|
23
cmd/gost/vendor/github.com/ginuerzh/gost/signal_unix.go
generated
vendored
Normal file
23
cmd/gost/vendor/github.com/ginuerzh/gost/signal_unix.go
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
// +build !windows
|
||||
|
||||
package gost
|
||||
|
||||
import (
|
||||
"github.com/golang/glog"
|
||||
"gopkg.in/xtaci/kcp-go.v2"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func kcpSigHandler() {
|
||||
ch := make(chan os.Signal, 1)
|
||||
signal.Notify(ch, syscall.SIGUSR1)
|
||||
|
||||
for {
|
||||
switch <-ch {
|
||||
case syscall.SIGUSR1:
|
||||
glog.V(LINFO).Infof("[kcp] SNMP: %+v", kcp.DefaultSnmp.Copy())
|
||||
}
|
||||
}
|
||||
}
|
6
cmd/gost/vendor/vendor.json
vendored
6
cmd/gost/vendor/vendor.json
vendored
@ -21,10 +21,10 @@
|
||||
"revisionTime": "2017-01-19T05:34:58Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "FiAXa5vUbpoqK2lhegpc9lOpumk=",
|
||||
"checksumSHA1": "90Nj9KD5KzY15ZBn95Coz7G85+0=",
|
||||
"path": "github.com/ginuerzh/gost",
|
||||
"revision": "d98860877d6952f26974ebaa044b29af05528f46",
|
||||
"revisionTime": "2017-03-03T07:45:56Z"
|
||||
"revision": "26f4e49f0538177eb5ec33c84a280afe2ae16042",
|
||||
"revisionTime": "2017-03-03T13:33:05Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "+XIOnTW0rv8Kr/amkXgMraNeUr4=",
|
||||
|
14
kcp.go
14
kcp.go
@ -14,8 +14,6 @@ import (
|
||||
"gopkg.in/xtaci/smux.v1"
|
||||
"net"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -250,18 +248,6 @@ func snmpLogger(path string, interval int) {
|
||||
}
|
||||
}
|
||||
|
||||
func kcpSigHandler() {
|
||||
ch := make(chan os.Signal, 1)
|
||||
signal.Notify(ch, syscall.SIGUSR1)
|
||||
|
||||
for {
|
||||
switch <-ch {
|
||||
case syscall.SIGUSR1:
|
||||
glog.V(LINFO).Infof("[kcp] SNMP: %+v", kcp.DefaultSnmp.Copy())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type KCPSession struct {
|
||||
conn net.Conn
|
||||
session *smux.Session
|
||||
|
5
signal.go
Normal file
5
signal.go
Normal file
@ -0,0 +1,5 @@
|
||||
// +build windows
|
||||
|
||||
package gost
|
||||
|
||||
func kcpSigHandler() {}
|
23
signal_unix.go
Normal file
23
signal_unix.go
Normal file
@ -0,0 +1,23 @@
|
||||
// +build !windows
|
||||
|
||||
package gost
|
||||
|
||||
import (
|
||||
"github.com/golang/glog"
|
||||
"gopkg.in/xtaci/kcp-go.v2"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func kcpSigHandler() {
|
||||
ch := make(chan os.Signal, 1)
|
||||
signal.Notify(ch, syscall.SIGUSR1)
|
||||
|
||||
for {
|
||||
switch <-ch {
|
||||
case syscall.SIGUSR1:
|
||||
glog.V(LINFO).Infof("[kcp] SNMP: %+v", kcp.DefaultSnmp.Copy())
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user