Skip to content

Commit

Permalink
调整目录结构
Browse files Browse the repository at this point in the history
  • Loading branch information
qtgolang committed Sep 8, 2023
1 parent 55ade4e commit 73efeae
Show file tree
Hide file tree
Showing 1,067 changed files with 145 additions and 537,072 deletions.
4 changes: 2 additions & 2 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package Api

import "C"
import (
"SunnyNet/project/public"
"SunnyNet/project/src/Certificate"
"github.com/qtgolang/SunnyNet/public"
"github.com/qtgolang/SunnyNet/src/Certificate"
)

// CreateCertificate 创建 证书管理器 对象
Expand Down
4 changes: 2 additions & 2 deletions project/Api/Compress.go → Api/Compress.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package Api

import "C"
import (
"SunnyNet/project/public"
"SunnyNet/project/src/brotli-go/enc"
"bytes"
"compress/flate"
"compress/gzip"
"compress/zlib"
"github.com/andybalholm/brotli"
"github.com/qtgolang/SunnyNet/public"
"github.com/qtgolang/SunnyNet/src/brotli-go/enc"
"io"
"io/ioutil"
)
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions project/Api/OtherApi.go → Api/OtherApi.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package Api

import (
"SunnyNet/project/Call"
"SunnyNet/project/public"
"SunnyNet/project/src/encoding/hex"
"bytes"
"encoding/binary"
"github.com/qtgolang/SunnyNet/Call"
"github.com/qtgolang/SunnyNet/public"
"github.com/qtgolang/SunnyNet/src/encoding/hex"
"strings"
)

Expand Down
26 changes: 13 additions & 13 deletions project/Api/Queue.go → Api/Queue.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Api

import (
"SunnyNet/project/public"
"github.com/qtgolang/SunnyNet/public"
"sync"
)

Expand Down Expand Up @@ -48,8 +48,8 @@ func (q *ArrayQueue) Pull() []byte {
return v
}

//CreateQueue
//创建队列
// CreateQueue
// 创建队列
func CreateQueue(name string) {
QueueLock.Lock()
if Queue[name] == nil {
Expand All @@ -61,8 +61,8 @@ func CreateQueue(name string) {
return
}

//QueueIsEmpty
//队列是否为空
// QueueIsEmpty
// 队列是否为空
func QueueIsEmpty(name string) bool {
QueueLock.Lock()
Object := Queue[name]
Expand All @@ -73,8 +73,8 @@ func QueueIsEmpty(name string) bool {
return Object.IsEmpty()
}

//QueueRelease
//清空销毁队列
// QueueRelease
// 清空销毁队列
func QueueRelease(name string) {
QueueLock.Lock()
Object := Queue[name]
Expand All @@ -88,8 +88,8 @@ func QueueRelease(name string) {
QueueLock.Unlock()
}

//QueueLength
//取队列长度
// QueueLength
// 取队列长度
func QueueLength(name string) int {
QueueLock.Lock()
Object := Queue[name]
Expand All @@ -100,8 +100,8 @@ func QueueLength(name string) int {
return Object.Length()
}

//QueuePush
//加入队列
// QueuePush
// 加入队列
func QueuePush(name string, val uintptr, valLen int) {
data := public.CStringToBytes(val, valLen)
QueueLock.Lock()
Expand All @@ -113,8 +113,8 @@ func QueuePush(name string, val uintptr, valLen int) {
Object.Push(data)
}

//QueuePull
//队列弹出
// QueuePull
// 队列弹出
func QueuePull(name string) uintptr {
QueueLock.Lock()
Object := Queue[name]
Expand Down
6 changes: 3 additions & 3 deletions project/Api/Redis.go → Api/Redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package Api

import "C"
import (
"SunnyNet/project/Call"
"SunnyNet/project/public"
redis "SunnyNet/project/src/Redis"
"bytes"
"encoding/json"
"errors"
"github.com/qtgolang/SunnyNet/Call"
"github.com/qtgolang/SunnyNet/public"
redis "github.com/qtgolang/SunnyNet/src/Redis"
"strings"
"sync"
)
Expand Down
4 changes: 2 additions & 2 deletions project/Api/Script.go → Api/Script.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package Api

import "C"
import (
"SunnyNet/project/public"
"SunnyNet/project/src/JsCall"
"github.com/qtgolang/SunnyNet/public"
"github.com/qtgolang/SunnyNet/src/JsCall"
)

func ScriptCall(i int, Request string) uintptr {
Expand Down
6 changes: 3 additions & 3 deletions project/Api/SunnyNet.go → Api/SunnyNet.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package Api

import (
"SunnyNet/project/SunnyNet"
"SunnyNet/project/public"
"SunnyNet/project/src/GoWinHttp"
"bytes"
"github.com/qtgolang/SunnyNet/SunnyNet"
"github.com/qtgolang/SunnyNet/public"
"github.com/qtgolang/SunnyNet/src/GoWinHttp"
"io/ioutil"
"net/http"
"net/url"
Expand Down
4 changes: 2 additions & 2 deletions project/Api/UDP.go → Api/UDP.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package Api

import (
"SunnyNet/project/public"
NFapi "SunnyNet/project/src/nfapi"
"github.com/qtgolang/SunnyNet/public"
NFapi "github.com/qtgolang/SunnyNet/src/nfapi"
)

func SetUdpData(MessageId int, data []byte) bool {
Expand Down
11 changes: 6 additions & 5 deletions project/Api/goWinhttp.go → Api/goWinhttp.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package Api

import (
"SunnyNet/project/public"
"SunnyNet/project/src/Certificate"
"SunnyNet/project/src/GoWinHttp"
"github.com/qtgolang/SunnyNet/public"
"github.com/qtgolang/SunnyNet/src/Certificate"
"github.com/qtgolang/SunnyNet/src/GoWinHttp"
"io"
"net/http"
"net/url"
"sync"
)

// ---------------------------------------------
// ---------------------------------------------
type h struct {
*GoWinHttp.WinHttp
Error error
Expand All @@ -33,8 +33,9 @@ func LoadHTTPClient(Context int) *h {
return s
}

//export CreateHTTPClient
// 创建 HTTP 客户端
//
//export CreateHTTPClient
func CreateHTTPClient() int {
HTTPMapLock.Lock()
HTTPMapLock.Unlock()
Expand Down
2 changes: 1 addition & 1 deletion project/Api/gomap.go → Api/gomap.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Api

import (
"SunnyNet/project/public"
"github.com/qtgolang/SunnyNet/public"
"strconv"
"sync"
"time"
Expand Down
4 changes: 2 additions & 2 deletions project/Api/httpcertificate.go → Api/httpcertificate.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package Api

import (
"SunnyNet/project/src/Certificate"
"SunnyNet/project/src/HttpCertificate"
"crypto/x509"
"github.com/qtgolang/SunnyNet/src/Certificate"
"github.com/qtgolang/SunnyNet/src/HttpCertificate"
)

// AddHttpCertificate 创建 Http证书管理器 对象 实现指定Host使用指定证书
Expand Down
4 changes: 2 additions & 2 deletions project/Api/protobuf.go → Api/protobuf.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package Api

import "C"
import (
"SunnyNet/project/public"
"SunnyNet/project/src/protobuf"
"encoding/json"
"github.com/qtgolang/SunnyNet/public"
"github.com/qtgolang/SunnyNet/src/protobuf"
"strings"
"unsafe"
)
Expand Down
10 changes: 5 additions & 5 deletions project/Api/socketClinet.go → Api/socketClinet.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package Api

import (
"SunnyNet/project/Call"
"SunnyNet/project/SunnyNet"
"SunnyNet/project/public"
"SunnyNet/project/src/Certificate"
"SunnyNet/project/src/GoWinHttp"
"bufio"
"bytes"
"crypto/tls"
"errors"
"github.com/qtgolang/SunnyNet/Call"
"github.com/qtgolang/SunnyNet/SunnyNet"
"github.com/qtgolang/SunnyNet/public"
"github.com/qtgolang/SunnyNet/src/Certificate"
"github.com/qtgolang/SunnyNet/src/GoWinHttp"
"net"
"net/url"
"sync"
Expand Down
2 changes: 1 addition & 1 deletion project/Api/webp.go → Api/webp.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package Api

import "C"
import (
"SunnyNet/project/public"
"bytes"
"github.com/qtgolang/SunnyNet/public"
"golang.org/x/image/webp"
"image/jpeg"
"image/png"
Expand Down
8 changes: 4 additions & 4 deletions project/Api/websocket.go → Api/websocket.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package Api

import (
"SunnyNet/project/Call"
"SunnyNet/project/public"
"SunnyNet/project/src/Certificate"
"SunnyNet/project/src/websocket"
"crypto/tls"
"errors"
"github.com/qtgolang/SunnyNet/Call"
"github.com/qtgolang/SunnyNet/public"
"github.com/qtgolang/SunnyNet/src/Certificate"
"github.com/qtgolang/SunnyNet/src/websocket"
"net/http"
"net/textproto"
"net/url"
Expand Down
5 changes: 0 additions & 5 deletions Build.bat

This file was deleted.

10 changes: 10 additions & 0 deletions BuildLibrary/Build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off
set CGO_ENABLED=1
set GOOS=windows
set GOARCH=386
set tmpPath=%~dp0
cd %tmpPath:~0,1%:
for %%I in ("%tmpPath%..\") do set "parentPath=%%~fI"
cd %parentPath%
@echo on
go build -buildmode=c-shared -ldflags "-s -w" -o "%tmpPath%Library\Sunny.dll"
10 changes: 10 additions & 0 deletions BuildLibrary/Buildx64.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off
set CGO_ENABLED=1
set GOOS=windows
set GOARCH=amd64
set tmpPath=%~dp0
cd %tmpPath:~0,1%:
for %%I in ("%tmpPath%..\") do set "parentPath=%%~fI"
cd %parentPath%
@echo on
go build -buildmode=c-shared -ldflags "-s -w" -o "%tmpPath%Library\Sunny64.dll"
Binary file renamed export/Sunny.dll → BuildLibrary/Library/Sunny.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion export/LinuxSunny.h → BuildLibrary/Library/Sunny.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Code generated by cmd/cgo; DO NOT EDIT. */

/* package SunnyNet */
/* package github.com/qtgolang/SunnyNet */


#line 1 "cgo-builtin-export-prolog"
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion export/Sunny64.h → BuildLibrary/Library/Sunny64.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Code generated by cmd/cgo; DO NOT EDIT. */

/* package SunnyNet */
/* package github.com/qtgolang/SunnyNet */


#line 1 "cgo-builtin-export-prolog"
Expand Down
6 changes: 5 additions & 1 deletion Build-Linux.sh → BuildLibrary/Linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ echo "正在编译..."
set CGO_ENABLED=1
set GOOS=linux
set GOARCH=386
go build -buildmode=c-shared -ldflags "-s -w" -o "export/LinuxSunny.so"
tmpPath=$(dirname "$(readlink -f "$0")")
parentPath=$(dirname "$tmpPath")
cd "$parentPath"

go build -buildmode=c-shared -ldflags "-s -w" -o "$tmpPath/Library/Sunny.so"
# 检查命令的退出状态码
if [ $? -ne 0 ]; then
echo ""
Expand Down
5 changes: 0 additions & 5 deletions Buildx64.bat

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion project/SunnyNet/Cache.go → SunnyNet/Cache.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package SunnyNet

import (
"SunnyNet/project/src/crypto/tls"
"github.com/qtgolang/SunnyNet/src/crypto/tls"
"sync"
)

Expand Down
4 changes: 2 additions & 2 deletions project/SunnyNet/Callback.go → SunnyNet/Callback.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package SunnyNet

import "C"
import (
"SunnyNet/project/Call"
"SunnyNet/project/public"
"github.com/qtgolang/SunnyNet/Call"
"github.com/qtgolang/SunnyNet/public"
"strconv"
)

Expand Down
4 changes: 2 additions & 2 deletions project/SunnyNet/GoCallBack.go → SunnyNet/GoCallBack.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package SunnyNet

import (
"SunnyNet/project/public"
"SunnyNet/project/src/GoWinHttp"
"github.com/qtgolang/SunnyNet/public"
"github.com/qtgolang/SunnyNet/src/GoWinHttp"
"net/http"
"net/url"
)
Expand Down
Loading

0 comments on commit 73efeae

Please sign in to comment.