mirror of
https://github.com/ginuerzh/gost.git
synced 2024-04-21 12:31:34 +00:00
fix compile error
This commit is contained in:
-14
@@ -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
@@ -0,0 +1,5 @@
|
||||
// +build windows
|
||||
|
||||
package gost
|
||||
|
||||
func kcpSigHandler() {}
|
||||
+23
@@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+3
-3
@@ -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,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
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user