Browse Source

update mod name

joe 3 years ago
parent
commit
882a080e38

+ 1 - 1
cpn/client_tcp.go

@@ -1,7 +1,7 @@
 package cpn
 
 import (
-	"git.wanbits.io/joe/nnet"
+	"git.wenlab.co/joe/nnet"
 )
 
 func NewTcpClient(cf *nnet.HubConfig, cb nnet.ISessionCallback, p nnet.IProtocol, opts ...ClientOption) nnet.IHub {

+ 3 - 2
cpn/client_ws.go

@@ -1,10 +1,11 @@
 package cpn
 
 import (
-	"git.wanbits.io/joe/nnet"
-	"github.com/gorilla/websocket"
 	"net"
 	"time"
+
+	"git.wenlab.co/joe/nnet"
+	"github.com/gorilla/websocket"
 )
 
 const (

+ 2 - 1
cpn/hub.go

@@ -1,10 +1,11 @@
 package cpn
 
 import (
-	"git.wanbits.io/joe/nnet"
 	"math/rand"
 	"sync"
 	"time"
+
+	"git.wenlab.co/joe/nnet"
 )
 
 type Hub struct {

+ 2 - 1
cpn/server_tcp.go

@@ -2,8 +2,9 @@ package cpn
 
 import (
 	"net"
-	"git.wanbits.io/joe/nnet"
 	"time"
+
+	"git.wenlab.co/joe/nnet"
 )
 
 type TcpServer struct {

+ 1 - 1
cpn/server_ws.go

@@ -3,9 +3,9 @@ package cpn
 import (
 	"net/http"
 
+	"git.wenlab.co/joe/nnet"
 	"github.com/gorilla/mux"
 	"github.com/gorilla/websocket"
-	"git.wanbits.io/joe/nnet"
 )
 
 type CallbackWsPath func(http.ResponseWriter, *http.Request)

+ 2 - 1
cpn/session.go

@@ -1,11 +1,12 @@
 package cpn
 
 import (
-	"git.wanbits.io/joe/nnet"
 	"net"
 	"sync"
 	"sync/atomic"
 	"time"
+
+	"git.wenlab.co/joe/nnet"
 )
 
 const (

+ 2 - 2
go.mod

@@ -1,6 +1,6 @@
-module git.wanbits.io/joe/nnet
+module git.wenlab.co/joe/nnet
 
-go 1.15
+go 1.17
 
 require (
 	github.com/gorilla/mux v1.8.0

+ 3 - 2
sample/tcpws/echo_client.go

@@ -3,12 +3,13 @@ package main
 import (
 	"bufio"
 	"fmt"
-	"git.wanbits.io/joe/nnet"
-	"git.wanbits.io/joe/nnet/cpn"
 	"net/url"
 	"os"
 	"strings"
 	"time"
+
+	"git.wenlab.co/joe/nnet"
+	"git.wenlab.co/joe/nnet/cpn"
 )
 
 var (

+ 2 - 1
sample/tcpws/echo_protocol.go

@@ -5,7 +5,8 @@ import (
 	"encoding/json"
 	"fmt"
 	"io"
-	"git.wanbits.io/joe/nnet"
+
+	"git.wenlab.co/joe/nnet"
 )
 
 type EchoPacket struct {

+ 3 - 2
sample/tcpws/echo_server.go

@@ -3,12 +3,13 @@ package main
 import (
 	"fmt"
 	"net"
-	"git.wanbits.io/joe/nnet"
-	"git.wanbits.io/joe/nnet/cpn"
 	"os"
 	"os/signal"
 	"syscall"
 	"time"
+
+	"git.wenlab.co/joe/nnet"
+	"git.wenlab.co/joe/nnet/cpn"
 )
 
 const (