Browse Source

replace zinx with github.com/aceld/zinx

master
Roger 5 years ago
parent
commit
fc287c36e6
  1. 6
      README.md
  2. 2
      examples/zinx_version_ex/ZinxV0.10Test/Client0.go
  3. 2
      examples/zinx_version_ex/ZinxV0.10Test/Client1.go
  4. 4
      examples/zinx_version_ex/ZinxV0.10Test/Server.go
  5. 2
      examples/zinx_version_ex/ZinxV0.11Test/Client0.go
  6. 2
      examples/zinx_version_ex/ZinxV0.11Test/Client1.go
  7. 6
      examples/zinx_version_ex/ZinxV0.11Test/Server.go
  8. 2
      examples/zinx_version_ex/ZinxV0.1Test/Server.go
  9. 2
      examples/zinx_version_ex/ZinxV0.2Test/Server.go
  10. 4
      examples/zinx_version_ex/ZinxV0.3Test/Server.go
  11. 4
      examples/zinx_version_ex/ZinxV0.4Test/Server.go
  12. 2
      examples/zinx_version_ex/ZinxV0.5Test/Client.go
  13. 4
      examples/zinx_version_ex/ZinxV0.5Test/Server.go
  14. 2
      examples/zinx_version_ex/ZinxV0.6Test-V0.7Test/Client0.go
  15. 2
      examples/zinx_version_ex/ZinxV0.6Test-V0.7Test/Client1.go
  16. 4
      examples/zinx_version_ex/ZinxV0.6Test-V0.7Test/Server.go
  17. 2
      examples/zinx_version_ex/ZinxV0.8Test/Client0.go
  18. 2
      examples/zinx_version_ex/ZinxV0.8Test/Client1.go
  19. 4
      examples/zinx_version_ex/ZinxV0.8Test/Server.go
  20. 2
      examples/zinx_version_ex/ZinxV0.9Test/Client0.go
  21. 2
      examples/zinx_version_ex/ZinxV0.9Test/Client1.go
  22. 4
      examples/zinx_version_ex/ZinxV0.9Test/Server.go
  23. 2
      examples/zinx_version_ex/datapackDemo/Client.go
  24. 2
      examples/zinx_version_ex/datapackDemo/Server.go
  25. 2
      examples/zinx_version_ex/protoDemo/main.go
  26. 2
      go.mod
  27. 4
      utils/globalobj.go
  28. 8
      zinx_app_demo/mmo_game/api/move.go
  29. 8
      zinx_app_demo/mmo_game/api/world_chat.go
  30. 2
      zinx_app_demo/mmo_game/client_AI_robot.go
  31. 4
      zinx_app_demo/mmo_game/core/player.go
  32. 8
      zinx_app_demo/mmo_game/server.go
  33. 4
      znet/connection.go
  34. 2
      znet/connmanager.go
  35. 4
      znet/datapack.go
  36. 4
      znet/msghandler.go
  37. 2
      znet/request.go
  38. 2
      znet/router.go
  39. 4
      znet/server.go
  40. 2
      znet/server_test.go
  41. 2
      ztimer/delayfunc.go
  42. 2
      ztimer/timerscheduler.go
  43. 2
      ztimer/timerscheduler_test.go
  44. 2
      ztimer/timewheel.go

6
README.md

@ -101,8 +101,8 @@ func main() {
```go
import (
"fmt"
"zinx/ziface"
"zinx/znet"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/znet"
)
//ping test 自定义路由
@ -133,7 +133,7 @@ import (
"io"
"net"
"time"
"zinx/znet"
"github.com/aceld/zinx/znet"
)
/*

2
examples/zinx_version_ex/ZinxV0.10Test/Client0.go

@ -5,7 +5,7 @@ import (
"io"
"net"
"time"
"zinx/znet"
"github.com/aceld/zinx/znet"
)
/*

2
examples/zinx_version_ex/ZinxV0.10Test/Client1.go

@ -5,7 +5,7 @@ import (
"io"
"net"
"time"
"zinx/znet"
"github.com/aceld/zinx/znet"
)
/*

4
examples/zinx_version_ex/ZinxV0.10Test/Server.go

@ -2,8 +2,8 @@ package main
import (
"fmt"
"zinx/ziface"
"zinx/znet"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/znet"
)
//ping test 自定义路由

2
examples/zinx_version_ex/ZinxV0.11Test/Client0.go

@ -5,7 +5,7 @@ import (
"io"
"net"
"time"
"zinx/znet"
"github.com/aceld/zinx/znet"
)
/*

2
examples/zinx_version_ex/ZinxV0.11Test/Client1.go

@ -5,7 +5,7 @@ import (
"io"
"net"
"time"
"zinx/znet"
"github.com/aceld/zinx/znet"
)
/*

6
examples/zinx_version_ex/ZinxV0.11Test/Server.go

@ -7,9 +7,9 @@
package main
import (
"zinx/ziface"
"zinx/zlog"
"zinx/znet"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/zlog"
"github.com/aceld/zinx/znet"
)
//ping test 自定义路由

2
examples/zinx_version_ex/ZinxV0.1Test/Server.go

@ -1,7 +1,7 @@
package main
import (
"zinx/znet"
"github.com/aceld/zinx/znet"
)

2
examples/zinx_version_ex/ZinxV0.2Test/Server.go

@ -1,7 +1,7 @@
package main
import (
"zinx/znet"
"github.com/aceld/zinx/znet"
)

4
examples/zinx_version_ex/ZinxV0.3Test/Server.go

@ -2,8 +2,8 @@ package main
import (
"fmt"
"zinx/ziface"
"zinx/znet"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/znet"
)
//ping test 自定义路由

4
examples/zinx_version_ex/ZinxV0.4Test/Server.go

@ -2,8 +2,8 @@ package main
import (
"fmt"
"zinx/ziface"
"zinx/znet"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/znet"
)
//ping test 自定义路由

2
examples/zinx_version_ex/ZinxV0.5Test/Client.go

@ -5,7 +5,7 @@ import (
"io"
"net"
"time"
"zinx/znet"
"github.com/aceld/zinx/znet"
)
/*

4
examples/zinx_version_ex/ZinxV0.5Test/Server.go

@ -2,8 +2,8 @@ package main
import (
"fmt"
"zinx/ziface"
"zinx/znet"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/znet"
)
//ping test 自定义路由

2
examples/zinx_version_ex/ZinxV0.6Test-V0.7Test/Client0.go

@ -5,7 +5,7 @@ import (
"io"
"net"
"time"
"zinx/znet"
"github.com/aceld/zinx/znet"
)
/*

2
examples/zinx_version_ex/ZinxV0.6Test-V0.7Test/Client1.go

@ -5,7 +5,7 @@ import (
"io"
"net"
"time"
"zinx/znet"
"github.com/aceld/zinx/znet"
)
/*

4
examples/zinx_version_ex/ZinxV0.6Test-V0.7Test/Server.go

@ -2,8 +2,8 @@ package main
import (
"fmt"
"zinx/ziface"
"zinx/znet"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/znet"
)
//ping test 自定义路由

2
examples/zinx_version_ex/ZinxV0.8Test/Client0.go

@ -5,7 +5,7 @@ import (
"io"
"net"
"time"
"zinx/znet"
"github.com/aceld/zinx/znet"
)
/*

2
examples/zinx_version_ex/ZinxV0.8Test/Client1.go

@ -5,7 +5,7 @@ import (
"io"
"net"
"time"
"zinx/znet"
"github.com/aceld/zinx/znet"
)
/*

4
examples/zinx_version_ex/ZinxV0.8Test/Server.go

@ -2,8 +2,8 @@ package main
import (
"fmt"
"zinx/ziface"
"zinx/znet"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/znet"
)
//ping test 自定义路由

2
examples/zinx_version_ex/ZinxV0.9Test/Client0.go

@ -5,7 +5,7 @@ import (
"io"
"net"
"time"
"zinx/znet"
"github.com/aceld/zinx/znet"
)
/*

2
examples/zinx_version_ex/ZinxV0.9Test/Client1.go

@ -5,7 +5,7 @@ import (
"io"
"net"
"time"
"zinx/znet"
"github.com/aceld/zinx/znet"
)
/*

4
examples/zinx_version_ex/ZinxV0.9Test/Server.go

@ -2,8 +2,8 @@ package main
import (
"fmt"
"zinx/ziface"
"zinx/znet"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/znet"
)
//ping test 自定义路由

2
examples/zinx_version_ex/datapackDemo/Client.go

@ -3,7 +3,7 @@ package main
import (
"fmt"
"net"
"zinx/znet"
"github.com/aceld/zinx/znet"
)
func main() {

2
examples/zinx_version_ex/datapackDemo/Server.go

@ -4,7 +4,7 @@ import (
"fmt"
"io"
"net"
"zinx/znet"
"github.com/aceld/zinx/znet"
)
//只是负责测试datapack拆包,封包功能

2
examples/zinx_version_ex/protoDemo/main.go

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/golang/protobuf/proto"
"zinx/examples/zinx_version_ex/protoDemo/pb"
"github.com/aceld/zinx/examples/zinx_version_ex/protoDemo/pb"
)
func main() {

2
go.mod

@ -1,4 +1,4 @@
module zinx
module github.com/aceld/zinx
go 1.13

4
utils/globalobj.go

@ -4,8 +4,8 @@ import (
"encoding/json"
"io/ioutil"
"os"
"zinx/ziface"
"zinx/zlog"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/zlog"
)
/*

8
zinx_app_demo/mmo_game/api/move.go

@ -3,10 +3,10 @@ package api
import (
"fmt"
"github.com/golang/protobuf/proto"
"zinx/ziface"
"zinx/zinx_app_demo/mmo_game/core"
"zinx/zinx_app_demo/mmo_game/pb"
"zinx/znet"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/zinx_app_demo/mmo_game/core"
"github.com/aceld/zinx/zinx_app_demo/mmo_game/pb"
"github.com/aceld/zinx/znet"
)
//玩家移动

8
zinx_app_demo/mmo_game/api/world_chat.go

@ -3,10 +3,10 @@ package api
import (
"fmt"
"github.com/golang/protobuf/proto"
"zinx/ziface"
"zinx/zinx_app_demo/mmo_game/core"
"zinx/zinx_app_demo/mmo_game/pb"
"zinx/znet"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/zinx_app_demo/mmo_game/core"
"github.com/aceld/zinx/zinx_app_demo/mmo_game/pb"
"github.com/aceld/zinx/znet"
)
//世界聊天 路由业务

2
zinx_app_demo/mmo_game/client_AI_robot.go

@ -11,7 +11,7 @@ import (
"os"
"os/signal"
"time"
"zinx/zinx_app_demo/mmo_game/pb"
"github.com/aceld/zinx/zinx_app_demo/mmo_game/pb"
)
type Message struct {

4
zinx_app_demo/mmo_game/core/player.go

@ -6,8 +6,8 @@ import (
"math/rand"
"sync"
"time"
"zinx/ziface"
"zinx/zinx_app_demo/mmo_game/pb"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/zinx_app_demo/mmo_game/pb"
)
//玩家对象

8
zinx_app_demo/mmo_game/server.go

@ -2,10 +2,10 @@ package main
import (
"fmt"
"zinx/ziface"
"zinx/zinx_app_demo/mmo_game/api"
"zinx/zinx_app_demo/mmo_game/core"
"zinx/znet"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/zinx_app_demo/mmo_game/api"
"github.com/aceld/zinx/zinx_app_demo/mmo_game/core"
"github.com/aceld/zinx/znet"
)
//当客户端建立连接的时候的hook函数

4
znet/connection.go

@ -6,8 +6,8 @@ import (
"io"
"net"
"sync"
"zinx/utils"
"zinx/ziface"
"github.com/aceld/zinx/utils"
"github.com/aceld/zinx/ziface"
)
type Connection struct {

2
znet/connmanager.go

@ -4,7 +4,7 @@ import (
"errors"
"fmt"
"sync"
"zinx/ziface"
"github.com/aceld/zinx/ziface"
)
/*

4
znet/datapack.go

@ -4,8 +4,8 @@ import (
"bytes"
"encoding/binary"
"errors"
"zinx/utils"
"zinx/ziface"
"github.com/aceld/zinx/utils"
"github.com/aceld/zinx/ziface"
)
//封包拆包类实例,暂时不需要成员

4
znet/msghandler.go

@ -3,8 +3,8 @@ package znet
import (
"fmt"
"strconv"
"zinx/utils"
"zinx/ziface"
"github.com/aceld/zinx/utils"
"github.com/aceld/zinx/ziface"
)
type MsgHandle struct {

2
znet/request.go

@ -1,6 +1,6 @@
package znet
import "zinx/ziface"
import "github.com/aceld/zinx/ziface"
type Request struct {
conn ziface.IConnection //已经和客户端建立好的 链接

2
znet/router.go

@ -1,6 +1,6 @@
package znet
import "zinx/ziface"
import "github.com/aceld/zinx/ziface"
//实现router时,先嵌入这个基类,然后根据需要对这个基类的方法进行重写
type BaseRouter struct {}

4
znet/server.go

@ -3,8 +3,8 @@ package znet
import (
"fmt"
"net"
"zinx/utils"
"zinx/ziface"
"github.com/aceld/zinx/utils"
"github.com/aceld/zinx/ziface"
)
var zinx_logo = `

2
znet/server_test.go

@ -5,7 +5,7 @@ import (
"net"
"testing"
"time"
"zinx/ziface"
"github.com/aceld/zinx/ziface"
)
/*

2
ztimer/delayfunc.go

@ -7,8 +7,8 @@ package ztimer
import (
"fmt"
"github.com/aceld/zinx/zlog"
"reflect"
"zinx/zlog"
)
/*

2
ztimer/timerscheduler.go

@ -12,7 +12,7 @@ import (
"math"
"sync"
"time"
"zinx/zlog"
"github.com/aceld/zinx/zlog"
)
const (

2
ztimer/timerscheduler_test.go

@ -11,7 +11,7 @@ import (
"fmt"
"testing"
"time"
"zinx/zlog"
"github.com/aceld/zinx/zlog"
)
//触发函数

2
ztimer/timewheel.go

@ -10,7 +10,7 @@ import (
"fmt"
"sync"
"time"
"zinx/zlog"
"github.com/aceld/zinx/zlog"
)
/*

Loading…
Cancel
Save