├── .gitmodules ├── benchmark └── compare-gnet │ ├── mac.png │ └── bench.md ├── examples ├── echo │ ├── ws-echo │ │ ├── js-client │ │ │ ├── addr.js │ │ │ ├── index.html │ │ │ └── style.css │ │ ├── client │ │ │ ├── assembly │ │ │ │ ├── common │ │ │ │ │ └── app.properties │ │ │ │ ├── windows │ │ │ │ │ ├── win32.sh │ │ │ │ │ ├── dev.sh │ │ │ │ │ ├── test.sh │ │ │ │ │ └── release.sh │ │ │ │ ├── linux │ │ │ │ │ ├── dev.sh │ │ │ │ │ ├── test.sh │ │ │ │ │ └── release.sh │ │ │ │ └── mac │ │ │ │ │ ├── dev.sh │ │ │ │ │ ├── release.sh │ │ │ │ │ └── test.sh │ │ │ ├── profiles │ │ │ │ ├── dev │ │ │ │ │ └── cert │ │ │ │ │ │ └── client.crt │ │ │ │ ├── test │ │ │ │ │ └── cert │ │ │ │ │ │ └── client.crt │ │ │ │ └── release │ │ │ │ │ └── cert │ │ │ │ │ └── client.crt │ │ │ └── app │ │ │ │ └── version.go │ │ └── server │ │ │ ├── assembly │ │ │ ├── common │ │ │ │ └── app.properties │ │ │ ├── linux │ │ │ │ ├── dev.sh │ │ │ │ ├── test.sh │ │ │ │ └── release.sh │ │ │ ├── mac │ │ │ │ ├── dev.sh │ │ │ │ ├── release.sh │ │ │ │ └── test.sh │ │ │ └── windows │ │ │ │ ├── dev.sh │ │ │ │ ├── release.sh │ │ │ │ └── test.sh │ │ │ ├── app │ │ │ └── version.go │ │ │ └── profiles │ │ │ ├── dev │ │ │ └── config.toml │ │ │ ├── test │ │ │ └── config.toml │ │ │ └── release │ │ │ └── config.toml │ ├── wss-echo │ │ ├── js-client │ │ │ ├── addr.js │ │ │ ├── index.html │ │ │ └── style.css │ │ ├── client │ │ │ ├── assembly │ │ │ │ ├── common │ │ │ │ │ └── app.properties │ │ │ │ ├── windows │ │ │ │ │ ├── win32.sh │ │ │ │ │ ├── dev.sh │ │ │ │ │ ├── test.sh │ │ │ │ │ └── release.sh │ │ │ │ ├── linux │ │ │ │ │ ├── dev.sh │ │ │ │ │ ├── test.sh │ │ │ │ │ └── release.sh │ │ │ │ └── mac │ │ │ │ │ ├── dev.sh │ │ │ │ │ ├── test.sh │ │ │ │ │ └── release.sh │ │ │ ├── profiles │ │ │ │ ├── dev │ │ │ │ │ └── cert │ │ │ │ │ │ └── client.crt │ │ │ │ ├── release │ │ │ │ │ └── cert │ │ │ │ │ │ └── client.crt │ │ │ │ └── test │ │ │ │ │ └── cert │ │ │ │ │ └── client.crt │ │ │ └── app │ │ │ │ └── version.go │ │ └── server │ │ │ ├── assembly │ │ │ ├── common │ │ │ │ └── app.properties │ │ │ ├── linux │ │ │ │ ├── dev.sh │ │ │ │ ├── test.sh │ │ │ │ └── release.sh │ │ │ ├── mac │ │ │ │ ├── dev.sh │ │ │ │ ├── test.sh │ │ │ │ └── release.sh │ │ │ └── windows │ │ │ │ ├── dev.sh │ │ │ │ ├── test.sh │ │ │ │ └── release.sh │ │ │ ├── profiles │ │ │ ├── dev │ │ │ │ └── cert │ │ │ │ │ ├── server.crt │ │ │ │ │ ├── server.key │ │ │ │ │ └── cert.sh │ │ │ ├── release │ │ │ │ └── cert │ │ │ │ │ ├── server.crt │ │ │ │ │ ├── server.key │ │ │ │ │ └── cert.sh │ │ │ └── test │ │ │ │ └── cert │ │ │ │ ├── server.crt │ │ │ │ ├── server.key │ │ │ │ └── cert.sh │ │ │ └── app │ │ │ └── version.go │ ├── tcp-echo │ │ ├── client │ │ │ ├── assembly │ │ │ │ ├── common │ │ │ │ │ └── app.properties │ │ │ │ ├── linux │ │ │ │ │ ├── dev.sh │ │ │ │ │ ├── test.sh │ │ │ │ │ └── release.sh │ │ │ │ ├── mac │ │ │ │ │ ├── dev.sh │ │ │ │ │ ├── test.sh │ │ │ │ │ └── release.sh │ │ │ │ └── windows │ │ │ │ │ ├── dev.sh │ │ │ │ │ ├── test.sh │ │ │ │ │ └── release.sh │ │ │ ├── app │ │ │ │ └── version.go │ │ │ └── profiles │ │ │ │ ├── release │ │ │ │ └── config.yml │ │ │ │ ├── test │ │ │ │ └── config.yml │ │ │ │ └── dev │ │ │ │ └── config.yml │ │ └── server │ │ │ ├── assembly │ │ │ ├── common │ │ │ │ └── app.properties │ │ │ ├── linux │ │ │ │ ├── dev.sh │ │ │ │ ├── test.sh │ │ │ │ └── release.sh │ │ │ ├── mac │ │ │ │ ├── dev.sh │ │ │ │ ├── test.sh │ │ │ │ └── release.sh │ │ │ └── windows │ │ │ │ ├── dev.sh │ │ │ │ ├── test.sh │ │ │ │ └── release.sh │ │ │ ├── app │ │ │ └── version.go │ │ │ └── profiles │ │ │ ├── dev │ │ │ └── config.yml │ │ │ ├── release │ │ │ └── config.yml │ │ │ └── test │ │ │ └── config.yml │ └── udp-echo │ │ ├── client │ │ ├── assembly │ │ │ ├── common │ │ │ │ └── app.properties │ │ │ ├── linux │ │ │ │ ├── dev.sh │ │ │ │ ├── test.sh │ │ │ │ └── release.sh │ │ │ ├── mac │ │ │ │ ├── dev.sh │ │ │ │ ├── test.sh │ │ │ │ └── release.sh │ │ │ └── windows │ │ │ │ ├── dev.sh │ │ │ │ ├── test.sh │ │ │ │ └── release.sh │ │ └── app │ │ │ └── version.go │ │ └── server │ │ ├── assembly │ │ ├── common │ │ │ └── app.properties │ │ ├── linux │ │ │ ├── dev.sh │ │ │ ├── test.sh │ │ │ └── release.sh │ │ ├── mac │ │ │ ├── dev.sh │ │ │ ├── test.sh │ │ │ └── release.sh │ │ └── windows │ │ │ ├── dev.sh │ │ │ ├── test.sh │ │ │ └── release.sh │ │ ├── app │ │ └── version.go │ │ └── profiles │ │ ├── dev │ │ └── config.toml │ │ ├── release │ │ └── config.toml │ │ └── test │ │ └── config.toml ├── profiles │ └── wss │ │ ├── client_cert │ │ └── client.crt │ │ └── server_cert │ │ ├── server.crt │ │ ├── server.key │ │ └── cert.sh └── build_all.sh ├── .github ├── ISSUE_TEMPLATE │ ├── enhancement.md │ └── bug-report.md ├── auto-comment.yml └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── demo ├── hello │ ├── README.md │ ├── tls │ │ ├── certs │ │ │ ├── ca.pem │ │ │ ├── ca.key │ │ │ ├── client.key │ │ │ ├── server0.key │ │ │ ├── client.pem │ │ │ └── server0.pem │ │ └── config.go │ ├── consts.go │ └── hello.go └── util │ ├── limit_darwin.go │ ├── limit_windows.go │ ├── pprof.go │ ├── signals.go │ └── limit_linux.go ├── CHANGE.md ├── .asf.yaml ├── before_validate_license.sh ├── go.mod ├── .licenserc.yaml ├── .travis.yml └── README.md /.gitmodules: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /benchmark/compare-gnet/mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/dubbo-getty/HEAD/benchmark/compare-gnet/mac.png -------------------------------------------------------------------------------- /examples/echo/ws-echo/js-client/addr.js: -------------------------------------------------------------------------------- 1 | // var serverAddress = '192.168.8.3:10000'; 2 | var serverAddress = '127.0.0.1:10000'; 3 | // var serverAddress = 'localhost:10000'; 4 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/js-client/addr.js: -------------------------------------------------------------------------------- 1 | // var serverAddress = '192.168.8.3:10000'; 2 | var serverAddress = '127.0.0.1:10000'; 3 | // var serverAddress = 'localhost:10000'; 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/enhancement.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Enhancement Request 3 | about: Suggest an enhancement 4 | labels: kind/feature 5 | 6 | --- 7 | 8 | 9 | **What would you like to be added**: 10 | 11 | **Why is this needed**: -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, build with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | *.idea 15 | *.iml 16 | target/ 17 | classes 18 | 19 | # vim 20 | *.swp 21 | 22 | vendor/ 23 | 24 | # vscode 25 | .vscode/ 26 | 27 | coverage.txt 28 | -------------------------------------------------------------------------------- /.github/auto-comment.yml: -------------------------------------------------------------------------------- 1 | # Comment to a new issue. 2 | issueOpened: > 3 | Thank your for raising a issue. We will try and get back to you as soon as possible. 4 | 5 | Please make sure you have given us as much context as possible. 6 | 7 | pullRequestOpened: > 8 | Thank your for raising your pull request. 9 | 10 | Please make sure you have followed our contributing guidelines. We will review it as soon as possible 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Report a bug 4 | labels: kind/bug 5 | 6 | --- 7 | 8 | 11 | 12 | 13 | **What happened**: 14 | 15 | **What you expected to happen**: 16 | 17 | **How to reproduce it (as minimally and precisely as possible)**: 18 | 19 | **Anything else we need to know?**: 20 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/client/assembly/common/app.properties: -------------------------------------------------------------------------------- 1 | # getty application configure script 2 | # ****************************************************** 3 | # DESC : application environment variable 4 | # AUTHOR : Alex Stocks 5 | # VERSION : 1.0 6 | # LICENCE : Apache License 2.0 7 | # EMAIL : alexstocks@foxmail.com 8 | # MOD : 2016-07-12 16:29 9 | # FILE : app.properties 10 | # ****************************************************** 11 | 12 | export TARGET_EXEC_NAME="echo_client" 13 | export BUILD_PACKAGE="app" 14 | 15 | export TARGET_CONF_FILE="conf/config.yml" 16 | export TARGET_LOG_CONF_FILE="conf/log.xml" 17 | 18 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/server/assembly/common/app.properties: -------------------------------------------------------------------------------- 1 | # getty application configure script 2 | # ****************************************************** 3 | # DESC : application environment variable 4 | # AUTHOR : Alex Stocks 5 | # VERSION : 1.0 6 | # LICENCE : Apache License 2.0 7 | # EMAIL : alexstocks@foxmail.com 8 | # MOD : 2016-07-12 16:29 9 | # FILE : app.properties 10 | # ****************************************************** 11 | 12 | export TARGET_EXEC_NAME="echo_server" 13 | export BUILD_PACKAGE="app" 14 | 15 | export TARGET_CONF_FILE="conf/config.yml" 16 | export TARGET_LOG_CONF_FILE="conf/log.xml" 17 | 18 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/client/assembly/common/app.properties: -------------------------------------------------------------------------------- 1 | # getty application configure script 2 | # ****************************************************** 3 | # DESC : application environment variable 4 | # AUTHOR : Alex Stocks 5 | # VERSION : 1.0 6 | # LICENCE : Apache License 2.0 7 | # EMAIL : alexstocks@foxmail.com 8 | # MOD : 2016-07-12 16:29 9 | # FILE : app.properties 10 | # ****************************************************** 11 | 12 | export TARGET_EXEC_NAME="echo_client" 13 | export BUILD_PACKAGE="app" 14 | 15 | export TARGET_CONF_FILE="conf/config.toml" 16 | export TARGET_LOG_CONF_FILE="conf/log.xml" 17 | 18 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/server/assembly/common/app.properties: -------------------------------------------------------------------------------- 1 | # getty application configure script 2 | # ****************************************************** 3 | # DESC : application environment variable 4 | # AUTHOR : Alex Stocks 5 | # VERSION : 1.0 6 | # LICENCE : Apache License 2.0 7 | # EMAIL : alexstocks@foxmail.com 8 | # MOD : 2016-07-12 16:29 9 | # FILE : app.properties 10 | # ****************************************************** 11 | 12 | export TARGET_EXEC_NAME="echo_server" 13 | export BUILD_PACKAGE="app" 14 | 15 | export TARGET_CONF_FILE="conf/config.toml" 16 | export TARGET_LOG_CONF_FILE="conf/log.xml" 17 | 18 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/assembly/common/app.properties: -------------------------------------------------------------------------------- 1 | # getty application configure script 2 | # ****************************************************** 3 | # DESC : application environment variable 4 | # AUTHOR : Alex Stocks 5 | # VERSION : 1.0 6 | # LICENCE : Apache License 2.0 7 | # EMAIL : alexstocks@foxmail.com 8 | # MOD : 2016-07-12 16:29 9 | # FILE : app.properties 10 | # ****************************************************** 11 | 12 | export TARGET_EXEC_NAME="echo_client" 13 | export BUILD_PACKAGE="app" 14 | 15 | export TARGET_CONF_FILE="conf/config.toml" 16 | export TARGET_LOG_CONF_FILE="conf/log.xml" 17 | 18 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/server/assembly/common/app.properties: -------------------------------------------------------------------------------- 1 | # getty application configure script 2 | # ****************************************************** 3 | # DESC : application environment variable 4 | # AUTHOR : Alex Stocks 5 | # VERSION : 1.0 6 | # LICENCE : Apache License 2.0 7 | # EMAIL : alexstocks@foxmail.com 8 | # MOD : 2016-07-12 16:29 9 | # FILE : app.properties 10 | # ****************************************************** 11 | 12 | export TARGET_EXEC_NAME="echo_server" 13 | export BUILD_PACKAGE="app" 14 | 15 | export TARGET_CONF_FILE="conf/config.toml" 16 | export TARGET_LOG_CONF_FILE="conf/log.xml" 17 | 18 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/assembly/common/app.properties: -------------------------------------------------------------------------------- 1 | # getty application configure script 2 | # ****************************************************** 3 | # DESC : application environment variable 4 | # AUTHOR : Alex Stocks 5 | # VERSION : 1.0 6 | # LICENCE : Apache License 2.0 7 | # EMAIL : alexstocks@foxmail.com 8 | # MOD : 2016-07-12 16:29 9 | # FILE : app.properties 10 | # ****************************************************** 11 | 12 | export TARGET_EXEC_NAME="echo_client" 13 | export BUILD_PACKAGE="app" 14 | 15 | export TARGET_CONF_FILE="conf/config.toml" 16 | export TARGET_LOG_CONF_FILE="conf/log.xml" 17 | 18 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/assembly/common/app.properties: -------------------------------------------------------------------------------- 1 | # getty application configure script 2 | # ****************************************************** 3 | # DESC : application environment variable 4 | # AUTHOR : Alex Stocks 5 | # VERSION : 1.0 6 | # LICENCE : Apache License 2.0 7 | # EMAIL : alexstocks@foxmail.com 8 | # MOD : 2016-07-12 16:29 9 | # FILE : app.properties 10 | # ****************************************************** 11 | 12 | export TARGET_EXEC_NAME="echo_server" 13 | export BUILD_PACKAGE="app" 14 | 15 | export TARGET_CONF_FILE="conf/config.toml" 16 | export TARGET_LOG_CONF_FILE="conf/log.xml" 17 | 18 | -------------------------------------------------------------------------------- /demo/hello/README.md: -------------------------------------------------------------------------------- 1 | # Run Hello Demo 2 | 3 | ## 1. prepare 4 | ```bash 5 | 6 | git clone https://github.com/apache/dubbo-getty.git 7 | 8 | cd getty/demo/hello 9 | ``` 10 | 11 | ## 2. run server 12 | 13 | run server: 14 | `go run tcp/server/server.go` 15 | 16 | Or run server in task pool mode: 17 | ```bash 18 | go run tcp/server/server.go -taskPool=true \ 19 | -task_pool_size=2000 \ 20 | -pprof_port=60000 21 | ``` 22 | 23 | ## 3. run client 24 | 25 | ```bash 26 | go run tcp/client/client.go 27 | ``` 28 | 29 | Or run client in task pool mode: 30 | ```bash 31 | go run tcp/client/client.go -taskPool=true \ 32 | -task_pool_size=50 \ 33 | -pprof_port=60001 34 | ``` 35 | 36 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 3 | 4 | **What this PR does**: 5 | 6 | **Which issue(s) this PR fixes**: 7 | 12 | Fixes # 13 | 14 | **Special notes for your reviewer**: 15 | 16 | **Does this PR introduce a user-facing change?**: 17 | 22 | ```release-note 23 | 24 | ``` -------------------------------------------------------------------------------- /examples/profiles/wss/client_cert/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICHjCCAYegAwIBAgIQKpKqamBqmZ0hfp8sYb4uNDANBgkqhkiG9w0BAQsFADAS 3 | MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw 4 | MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB 5 | iQKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIGCSTy/M5X 6 | Nnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+URNjTHGP 7 | NXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQABo3MwcTAO 8 | BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw 9 | AwEB/zA5BgNVHREEMjAwgglsb2NhbGhvc3SCC2V4YW1wbGUuY29thwR/AAABhxAA 10 | AAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4GBAE5dr9q7ORmKZ7yZqeSL 11 | 305armc13A7UxffUajeJFujpl2jOqnb5PuKJ7fn5HQKGB0qSq3IHsFua2WONXcTW 12 | Vn4gS0k50IaDpW+yl+ArIo0QwbjPIAcFysX10p9dVO7A1uEpHbRDzefem6r9uVGk 13 | i7dOLEoC8hkfk6nJsNEIEqu6 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /examples/profiles/wss/server_cert/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICHjCCAYegAwIBAgIQKpKqamBqmZ0hfp8sYb4uNDANBgkqhkiG9w0BAQsFADAS 3 | MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw 4 | MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB 5 | iQKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIGCSTy/M5X 6 | Nnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+URNjTHGP 7 | NXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQABo3MwcTAO 8 | BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw 9 | AwEB/zA5BgNVHREEMjAwgglsb2NhbGhvc3SCC2V4YW1wbGUuY29thwR/AAABhxAA 10 | AAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4GBAE5dr9q7ORmKZ7yZqeSL 11 | 305armc13A7UxffUajeJFujpl2jOqnb5PuKJ7fn5HQKGB0qSq3IHsFua2WONXcTW 12 | Vn4gS0k50IaDpW+yl+ArIo0QwbjPIAcFysX10p9dVO7A1uEpHbRDzefem6r9uVGk 13 | i7dOLEoC8hkfk6nJsNEIEqu6 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/profiles/dev/cert/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICHjCCAYegAwIBAgIQKpKqamBqmZ0hfp8sYb4uNDANBgkqhkiG9w0BAQsFADAS 3 | MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw 4 | MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB 5 | iQKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIGCSTy/M5X 6 | Nnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+URNjTHGP 7 | NXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQABo3MwcTAO 8 | BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw 9 | AwEB/zA5BgNVHREEMjAwgglsb2NhbGhvc3SCC2V4YW1wbGUuY29thwR/AAABhxAA 10 | AAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4GBAE5dr9q7ORmKZ7yZqeSL 11 | 305armc13A7UxffUajeJFujpl2jOqnb5PuKJ7fn5HQKGB0qSq3IHsFua2WONXcTW 12 | Vn4gS0k50IaDpW+yl+ArIo0QwbjPIAcFysX10p9dVO7A1uEpHbRDzefem6r9uVGk 13 | i7dOLEoC8hkfk6nJsNEIEqu6 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/profiles/test/cert/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICHjCCAYegAwIBAgIQKpKqamBqmZ0hfp8sYb4uNDANBgkqhkiG9w0BAQsFADAS 3 | MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw 4 | MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB 5 | iQKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIGCSTy/M5X 6 | Nnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+URNjTHGP 7 | NXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQABo3MwcTAO 8 | BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw 9 | AwEB/zA5BgNVHREEMjAwgglsb2NhbGhvc3SCC2V4YW1wbGUuY29thwR/AAABhxAA 10 | AAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4GBAE5dr9q7ORmKZ7yZqeSL 11 | 305armc13A7UxffUajeJFujpl2jOqnb5PuKJ7fn5HQKGB0qSq3IHsFua2WONXcTW 12 | Vn4gS0k50IaDpW+yl+ArIo0QwbjPIAcFysX10p9dVO7A1uEpHbRDzefem6r9uVGk 13 | i7dOLEoC8hkfk6nJsNEIEqu6 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/profiles/dev/cert/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICHjCCAYegAwIBAgIQKpKqamBqmZ0hfp8sYb4uNDANBgkqhkiG9w0BAQsFADAS 3 | MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw 4 | MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB 5 | iQKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIGCSTy/M5X 6 | Nnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+URNjTHGP 7 | NXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQABo3MwcTAO 8 | BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw 9 | AwEB/zA5BgNVHREEMjAwgglsb2NhbGhvc3SCC2V4YW1wbGUuY29thwR/AAABhxAA 10 | AAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4GBAE5dr9q7ORmKZ7yZqeSL 11 | 305armc13A7UxffUajeJFujpl2jOqnb5PuKJ7fn5HQKGB0qSq3IHsFua2WONXcTW 12 | Vn4gS0k50IaDpW+yl+ArIo0QwbjPIAcFysX10p9dVO7A1uEpHbRDzefem6r9uVGk 13 | i7dOLEoC8hkfk6nJsNEIEqu6 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/profiles/dev/cert/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICHjCCAYegAwIBAgIQKpKqamBqmZ0hfp8sYb4uNDANBgkqhkiG9w0BAQsFADAS 3 | MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw 4 | MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB 5 | iQKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIGCSTy/M5X 6 | Nnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+URNjTHGP 7 | NXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQABo3MwcTAO 8 | BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw 9 | AwEB/zA5BgNVHREEMjAwgglsb2NhbGhvc3SCC2V4YW1wbGUuY29thwR/AAABhxAA 10 | AAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4GBAE5dr9q7ORmKZ7yZqeSL 11 | 305armc13A7UxffUajeJFujpl2jOqnb5PuKJ7fn5HQKGB0qSq3IHsFua2WONXcTW 12 | Vn4gS0k50IaDpW+yl+ArIo0QwbjPIAcFysX10p9dVO7A1uEpHbRDzefem6r9uVGk 13 | i7dOLEoC8hkfk6nJsNEIEqu6 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/profiles/release/cert/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICHjCCAYegAwIBAgIQKpKqamBqmZ0hfp8sYb4uNDANBgkqhkiG9w0BAQsFADAS 3 | MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw 4 | MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB 5 | iQKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIGCSTy/M5X 6 | Nnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+URNjTHGP 7 | NXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQABo3MwcTAO 8 | BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw 9 | AwEB/zA5BgNVHREEMjAwgglsb2NhbGhvc3SCC2V4YW1wbGUuY29thwR/AAABhxAA 10 | AAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4GBAE5dr9q7ORmKZ7yZqeSL 11 | 305armc13A7UxffUajeJFujpl2jOqnb5PuKJ7fn5HQKGB0qSq3IHsFua2WONXcTW 12 | Vn4gS0k50IaDpW+yl+ArIo0QwbjPIAcFysX10p9dVO7A1uEpHbRDzefem6r9uVGk 13 | i7dOLEoC8hkfk6nJsNEIEqu6 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/profiles/release/cert/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICHjCCAYegAwIBAgIQKpKqamBqmZ0hfp8sYb4uNDANBgkqhkiG9w0BAQsFADAS 3 | MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw 4 | MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB 5 | iQKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIGCSTy/M5X 6 | Nnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+URNjTHGP 7 | NXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQABo3MwcTAO 8 | BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw 9 | AwEB/zA5BgNVHREEMjAwgglsb2NhbGhvc3SCC2V4YW1wbGUuY29thwR/AAABhxAA 10 | AAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4GBAE5dr9q7ORmKZ7yZqeSL 11 | 305armc13A7UxffUajeJFujpl2jOqnb5PuKJ7fn5HQKGB0qSq3IHsFua2WONXcTW 12 | Vn4gS0k50IaDpW+yl+ArIo0QwbjPIAcFysX10p9dVO7A1uEpHbRDzefem6r9uVGk 13 | i7dOLEoC8hkfk6nJsNEIEqu6 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/profiles/test/cert/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICHjCCAYegAwIBAgIQKpKqamBqmZ0hfp8sYb4uNDANBgkqhkiG9w0BAQsFADAS 3 | MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw 4 | MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB 5 | iQKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIGCSTy/M5X 6 | Nnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+URNjTHGP 7 | NXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQABo3MwcTAO 8 | BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw 9 | AwEB/zA5BgNVHREEMjAwgglsb2NhbGhvc3SCC2V4YW1wbGUuY29thwR/AAABhxAA 10 | AAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4GBAE5dr9q7ORmKZ7yZqeSL 11 | 305armc13A7UxffUajeJFujpl2jOqnb5PuKJ7fn5HQKGB0qSq3IHsFua2WONXcTW 12 | Vn4gS0k50IaDpW+yl+ArIo0QwbjPIAcFysX10p9dVO7A1uEpHbRDzefem6r9uVGk 13 | i7dOLEoC8hkfk6nJsNEIEqu6 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/profiles/release/cert/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICHjCCAYegAwIBAgIQKpKqamBqmZ0hfp8sYb4uNDANBgkqhkiG9w0BAQsFADAS 3 | MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw 4 | MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB 5 | iQKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIGCSTy/M5X 6 | Nnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+URNjTHGP 7 | NXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQABo3MwcTAO 8 | BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw 9 | AwEB/zA5BgNVHREEMjAwgglsb2NhbGhvc3SCC2V4YW1wbGUuY29thwR/AAABhxAA 10 | AAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4GBAE5dr9q7ORmKZ7yZqeSL 11 | 305armc13A7UxffUajeJFujpl2jOqnb5PuKJ7fn5HQKGB0qSq3IHsFua2WONXcTW 12 | Vn4gS0k50IaDpW+yl+ArIo0QwbjPIAcFysX10p9dVO7A1uEpHbRDzefem6r9uVGk 13 | i7dOLEoC8hkfk6nJsNEIEqu6 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/profiles/test/cert/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICHjCCAYegAwIBAgIQKpKqamBqmZ0hfp8sYb4uNDANBgkqhkiG9w0BAQsFADAS 3 | MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw 4 | MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB 5 | iQKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIGCSTy/M5X 6 | Nnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+URNjTHGP 7 | NXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQABo3MwcTAO 8 | BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw 9 | AwEB/zA5BgNVHREEMjAwgglsb2NhbGhvc3SCC2V4YW1wbGUuY29thwR/AAABhxAA 10 | AAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4GBAE5dr9q7ORmKZ7yZqeSL 11 | 305armc13A7UxffUajeJFujpl2jOqnb5PuKJ7fn5HQKGB0qSq3IHsFua2WONXcTW 12 | Vn4gS0k50IaDpW+yl+ArIo0QwbjPIAcFysX10p9dVO7A1uEpHbRDzefem6r9uVGk 13 | i7dOLEoC8hkfk6nJsNEIEqu6 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /demo/hello/tls/certs/ca.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSjCCAbOgAwIBAgIJAJHGGR4dGioHMA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNV 3 | BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX 4 | aWRnaXRzIFB0eSBMdGQxDzANBgNVBAMTBnRlc3RjYTAeFw0xNDExMTEyMjMxMjla 5 | Fw0yNDExMDgyMjMxMjlaMFYxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0 6 | YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDzANBgNVBAMT 7 | BnRlc3RjYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwEDfBV5MYdlHVHJ7 8 | +L4nxrZy7mBfAVXpOc5vMYztssUI7mL2/iYujiIXM+weZYNTEpLdjyJdu7R5gGUu 9 | g1jSVK/EPHfc74O7AyZU34PNIP4Sh33N+/A5YexrNgJlPY+E3GdVYi4ldWJjgkAd 10 | Qah2PH5ACLrIIC6tRka9hcaBlIECAwEAAaMgMB4wDAYDVR0TBAUwAwEB/zAOBgNV 11 | HQ8BAf8EBAMCAgQwDQYJKoZIhvcNAQELBQADgYEAHzC7jdYlzAVmddi/gdAeKPau 12 | sPBG/C2HCWqHzpCUHcKuvMzDVkY/MP2o6JIW2DBbY64bO/FceExhjcykgaYtCH/m 13 | oIU63+CFOTtR7otyQAWHqXa7q4SbCDlG7DyRFxqG0txPtGvy12lgldA2+RgcigQG 14 | Dfcog5wrJytaQ6UA0wE= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /demo/util/limit_darwin.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package util 19 | 20 | func SetLimit() { 21 | } 22 | -------------------------------------------------------------------------------- /demo/util/limit_windows.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package util 19 | 20 | func SetLimit() { 21 | } 22 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | var ( 21 | Version = "1.5.0" 22 | ) 23 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/server/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | var ( 21 | Version = "1.5.0" 22 | ) 23 | -------------------------------------------------------------------------------- /benchmark/compare-gnet/bench.md: -------------------------------------------------------------------------------- 1 | # gnet & getty 2 | 3 | ## 概览 4 | 5 | 8c 16g Mac 6 | ![](./mac.png) 7 | 8 | ## script 9 | 10 | ```bash 11 | tcpkali --workers 4 -c 100 -T 300s -m "PING{$nl}" 127.0.0.1:$4 12 | ``` 13 | 14 | ## version 15 | 16 | `github.com/panjf2000/gnet v1.1.5` 17 | 18 | `github.com/apache/dubbo-getty v1.4.8` 19 | 20 | ## Comparision 21 | 22 | | 连接数 | 执行时间(s) | 消息长度(byte) | Gnet总发送数据量(MB) | Getty总发送数据量(MB)| Gnet总接受数据量(MB)| Getty总接受数据量(MB) | Gnet带宽(Mbps)| Getty带宽(Mbps)| 23 | | :--- | :---- | :--- | :--- |:--- | :---- | :--- | :--- |:--- | 24 | | 10 | 30 | 6 | 46558 | 6809 | 46536 | 6804 | 13008.115↓, 13014.275↑ | 1902.656↓, 1904.007↑ | 25 | | 100 | 300 | 6 | 317931 | 69128 | 317929 | 69138 | 8889.853↓, 8889.894↑ | 1933.210↓, 1932.910↑ | 26 | 27 | ## Conclusion 28 | 29 | * 1 连接较少时,Gnet 总体吞吐是 Getty 的 4-6 倍左右 30 | * 2 但在增加并发数的时候,Gnet性能下降明显,Getty 表现稳定,总体吞吐也从 6 倍下降到 4 倍左右 31 | * 3 连接数 200 个链接的时候 gnet 就不可用了,机器直接 gg,getty 仍在稳定运行 32 | 33 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/client/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | var ( 21 | Version = "1.5.0" 22 | ) 23 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/server/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | var ( 21 | Version = "1.5.0" 22 | ) 23 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/client/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | var ( 21 | Version = "1.5.0" 22 | ) 23 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/server/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | var ( 21 | Version = "1.5.0" 22 | ) 23 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | var ( 21 | Version = "1.5.0" 22 | ) 23 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | var ( 21 | Version = "1.5.0" 22 | ) 23 | -------------------------------------------------------------------------------- /examples/profiles/wss/server_cert/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXgIBAAKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIG 3 | CSTy/M5XNnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+ 4 | URNjTHGPNXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQAB 5 | AoGBAJgvuXQY/fxSxUWkysvBvn9Al17cSrN0r23gBkvBaakMASvfSIbBGMU4COwM 6 | bYV0ivkWNcK539/oQHk1lU85Bv0K9V9wtuFrYW0mN3TU6jnl6eEnzW5oy0Z9TwyY 7 | wuGQOSXGr/aDVu8Wr7eOmSvn6j8rWO2dSMHCllJnSBoqQ1aZAkEA5YQspoMhUaq+ 8 | kC53GTgMhotnmK3fWfWKrlLf0spsaNl99W3+plwqxnJbye+5uEutRR1PWSWCCKq5 9 | bN9veOXViwJBAM6WS5aeKO/JX09O0Ang9Y0+atMKO0YjX6fNFE2UJ5Ewzyr4DMZK 10 | TmBpyzm4x/GhV9ukqcDcd3dNlUOtgRqY3+cCQQDCGmssk1+dUpqBE1rT8CvfqYv+ 11 | eqWWzerwDNSPz3OppK4630Bqby4Z0GNCP8RAUXgDKIuPqAH11HSm17vNcgqLAkA8 12 | 8FCzyUvCD+CxgEoV3+oPFA5m2mnJsr2QvgnzKHTTe1ZhEnKSO3ELN6nfCQbR3AoS 13 | nGwGnAIRiy0wnYmr0tSZAkEAsWFm/D7sTQhX4Qnh15ZDdUn1WSWjBZevUtJnQcpx 14 | TjihZq2sd3uK/XrzG+w7B+cPZlrZtQ94sDSVQwWl/sxB4A== 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /demo/hello/tls/certs/ca.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAMBA3wVeTGHZR1Ry 3 | e/i+J8a2cu5gXwFV6TnObzGM7bLFCO5i9v4mLo4iFzPsHmWDUxKS3Y8iXbu0eYBl 4 | LoNY0lSvxDx33O+DuwMmVN+DzSD+Eod9zfvwOWHsazYCZT2PhNxnVWIuJXViY4JA 5 | HUGodjx+QAi6yCAurUZGvYXGgZSBAgMBAAECgYAxRi8i9BlFlufGSBVoGmydbJOm 6 | bwLKl9dP3o33ODSP9hok5y6A0w5plWk3AJSF1hPLleK9VcSKYGYnt0clmPVHF35g 7 | bx2rVK8dOT0mn7rz9Zr70jcSz1ETA2QonHZ+Y+niLmcic9At6hRtWiewblUmyFQm 8 | GwggIzi7LOyEUHrEcQJBAOXxyQvnLvtKzXiqcsW/K6rExqVJVk+KF0fzzVyMzTJx 9 | HRBxUVgvGdEJT7j+7P2kcTyafve0BBzDSPIaDyiJ+Y0CQQDWCb7jASFSbu5M3Zcd 10 | Gkr4ZKN1XO3VLQX10b22bQYdF45hrTN2tnzRvVUR4q86VVnXmiGiTqmLkXcA2WWf 11 | pHfFAkAhv9olUBo6MeF0i3frBEMRfm41hk0PwZHnMqZ6pgPcGnQMnMU2rzsXzkkQ 12 | OwJnvAIOxhJKovZTjmofdqmw5odlAkBYVUdRWjsNUTjJwj3GRf6gyq/nFMYWz3EB 13 | RWFdM1ttkDYzu45ctO2IhfHg4sPceDMO1s6AtKQmNI9/azkUjITdAkApNa9yFRzc 14 | TBaDNPd5KVd58LVIzoPQ6i7uMHteLXJUWqSroji6S3s4gKMFJ/dO+ZXIlgQgfJJJ 15 | ZDL4cdrdkeoM 16 | -----END PRIVATE KEY----- 17 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/profiles/dev/cert/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXgIBAAKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIG 3 | CSTy/M5XNnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+ 4 | URNjTHGPNXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQAB 5 | AoGBAJgvuXQY/fxSxUWkysvBvn9Al17cSrN0r23gBkvBaakMASvfSIbBGMU4COwM 6 | bYV0ivkWNcK539/oQHk1lU85Bv0K9V9wtuFrYW0mN3TU6jnl6eEnzW5oy0Z9TwyY 7 | wuGQOSXGr/aDVu8Wr7eOmSvn6j8rWO2dSMHCllJnSBoqQ1aZAkEA5YQspoMhUaq+ 8 | kC53GTgMhotnmK3fWfWKrlLf0spsaNl99W3+plwqxnJbye+5uEutRR1PWSWCCKq5 9 | bN9veOXViwJBAM6WS5aeKO/JX09O0Ang9Y0+atMKO0YjX6fNFE2UJ5Ewzyr4DMZK 10 | TmBpyzm4x/GhV9ukqcDcd3dNlUOtgRqY3+cCQQDCGmssk1+dUpqBE1rT8CvfqYv+ 11 | eqWWzerwDNSPz3OppK4630Bqby4Z0GNCP8RAUXgDKIuPqAH11HSm17vNcgqLAkA8 12 | 8FCzyUvCD+CxgEoV3+oPFA5m2mnJsr2QvgnzKHTTe1ZhEnKSO3ELN6nfCQbR3AoS 13 | nGwGnAIRiy0wnYmr0tSZAkEAsWFm/D7sTQhX4Qnh15ZDdUn1WSWjBZevUtJnQcpx 14 | TjihZq2sd3uK/XrzG+w7B+cPZlrZtQ94sDSVQwWl/sxB4A== 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/profiles/test/cert/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXgIBAAKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIG 3 | CSTy/M5XNnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+ 4 | URNjTHGPNXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQAB 5 | AoGBAJgvuXQY/fxSxUWkysvBvn9Al17cSrN0r23gBkvBaakMASvfSIbBGMU4COwM 6 | bYV0ivkWNcK539/oQHk1lU85Bv0K9V9wtuFrYW0mN3TU6jnl6eEnzW5oy0Z9TwyY 7 | wuGQOSXGr/aDVu8Wr7eOmSvn6j8rWO2dSMHCllJnSBoqQ1aZAkEA5YQspoMhUaq+ 8 | kC53GTgMhotnmK3fWfWKrlLf0spsaNl99W3+plwqxnJbye+5uEutRR1PWSWCCKq5 9 | bN9veOXViwJBAM6WS5aeKO/JX09O0Ang9Y0+atMKO0YjX6fNFE2UJ5Ewzyr4DMZK 10 | TmBpyzm4x/GhV9ukqcDcd3dNlUOtgRqY3+cCQQDCGmssk1+dUpqBE1rT8CvfqYv+ 11 | eqWWzerwDNSPz3OppK4630Bqby4Z0GNCP8RAUXgDKIuPqAH11HSm17vNcgqLAkA8 12 | 8FCzyUvCD+CxgEoV3+oPFA5m2mnJsr2QvgnzKHTTe1ZhEnKSO3ELN6nfCQbR3AoS 13 | nGwGnAIRiy0wnYmr0tSZAkEAsWFm/D7sTQhX4Qnh15ZDdUn1WSWjBZevUtJnQcpx 14 | TjihZq2sd3uK/XrzG+w7B+cPZlrZtQ94sDSVQwWl/sxB4A== 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /demo/hello/tls/certs/client.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIICeQIBADANBgkqhkiG9w0BAQEFAASCAmMwggJfAgEAAoGBAOxUR9uhvhbeVUIM 3 | s5WbH0px0mehl2+6sZpNjzvE2KimZpHzMJHukVH0Ffkvhs0b8+S5Ut9VNUAqd3IM 4 | JCCAEGtRNoQhM1t9Yr2zAckSvbRacp+FL/Cj9eDmyo00KsVGaeefA4Dh4OW+ZhkT 5 | NKcldXqkSuj1sEf244JZYuqZp6/tAgMBAAECgYEAi2NSVqpZMafE5YYUTcMGe6QS 6 | k2jtpsqYgggI2RnLJ/2tNZwYI5pwP8QVSbnMaiF4gokD5hGdrNDfTnb2v+yIwYEH 7 | 0w8+oG7Z81KodsiZSIDJfTGsAZhVNwOz9y0VD8BBZZ1/274Zh52AUKLjZS/ZwIbS 8 | W2ywya855dPnH/wj+0ECQQD9X8D920kByTNHhBG18biAEZ4pxs9f0OAG8333eVcI 9 | w2lJDLsYDZrCB2ocgA3lUdozlzPC7YDYw8reg0tkiRY5AkEA7sdNzOeQsQRn7++5 10 | 0bP9DtT/iON1gbfxRzCfCfXdoOtfQWIzTePWtURt9X/5D9NofI0Rg5W2oGy/MLe5 11 | /sXHVQJBAIup5XrJDkQywNZyAUU2ecn2bCWBFjwtqd+LBmuMciI9fOKsZtEKZrz/ 12 | U0lkeMRoSwvXE8wmGLjjrAbdfohrXFkCQQDZEx/LtIl6JINJQiswVe0tWr6k+ASP 13 | 1WXoTm+HYpoF/XUvv9LccNF1IazFj34hwRQwhx7w/V52Ieb+p0jUMYGxAkEAjDhd 14 | 9pBO1fKXWiXzi9ZKfoyTNcUq3eBSVKwPG2nItg5ycXengjT5sgcWDnciIzW7BIVI 15 | JiqOszq9GWESErAatg== 16 | -----END PRIVATE KEY----- 17 | -------------------------------------------------------------------------------- /demo/hello/tls/certs/server0.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANOmffupIGC8YDau 3 | rOF4eKnHwPszgpkkhWzKsVxhNDBxCVYx4TEjG0XWIO0iyRXupZbUC+7N/8HnEVNa 4 | 8F1jYhng14Iiq99cNQbbnuHHhIztmpocrJTxmnhGzoAnRa1Tb+GnAuRoIHRA/V2c 5 | VUE9tbikQugFx/SPgXAw6tfWB+YvAgMBAAECgYEAoEq9qzUBgoHoVEGiSPiWWe8g 6 | 5p6yUA1qx2QTQyWTAwT4z0DjjfVKmG99bFsl8+hTnJFnoCp/gnjflEOROwkjp5kG 7 | m0drqOPx1jeipJjpXYTBu49h+WpZ1PF+KhVtxsIm3OOCvh67iWaKyyOVb5Og8aiR 8 | jl6dn/TdG/dlGD8AfUECQQDuNMle6p0oU8amC6O9wIMBroxx2nFstzE6O35PLEzG 9 | /tj0kxxn9Jp2TS9mGaLCzSuXmpjlF4+NOWiBPkrLC2TfAkEA43Xg7uEUkaJAz2/W 10 | m1lIBTLt+4rIQY/2emh33bDcA+rv8rwwrMMIv17/xPx7bs49YqGG5xufD+Rwl6TL 11 | qFXYsQJAPrOwagax1aKvwJeBw3oAQhoTKAkLIEXcdGqipe6QSzVcIIz0xjxxyEAr 12 | AOIwoLxnBCISqwMXq2H4K0UdZPMb2wJAdhdYLY1L6YRMk6XjzImg25oidisKZweA 13 | FvMv8DgHMj2CUAqmVrt3SivfLH1M9C09L3zfFhOAFHcsgX58gav4MQJBANSBnrHj 14 | tIq4l8z79CPUIuu3QyeEh+XwY8s5qE5CNTck0U59lzp9NvENHbkx3KO896TTerko 15 | +8bXHMLkJkHPXms= 16 | -----END PRIVATE KEY----- 17 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/profiles/release/cert/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXgIBAAKBgQC5Nxsk6WjeaYazRYiGxHZ5G3FXSlSjV7lZeebItdEPzO8kVPIG 3 | CSTy/M5XNnpp3uVDFXQub0/O5t9Y6wcuqpUGMOV+XL7MZqSZlodXm0XhNYzCAjZ+ 4 | URNjTHGPNXIqdDEG5Ba8SXMOfY6H97+QxugZoAMFZ+N83ggr12IYNO/FbQIDAQAB 5 | AoGBAJgvuXQY/fxSxUWkysvBvn9Al17cSrN0r23gBkvBaakMASvfSIbBGMU4COwM 6 | bYV0ivkWNcK539/oQHk1lU85Bv0K9V9wtuFrYW0mN3TU6jnl6eEnzW5oy0Z9TwyY 7 | wuGQOSXGr/aDVu8Wr7eOmSvn6j8rWO2dSMHCllJnSBoqQ1aZAkEA5YQspoMhUaq+ 8 | kC53GTgMhotnmK3fWfWKrlLf0spsaNl99W3+plwqxnJbye+5uEutRR1PWSWCCKq5 9 | bN9veOXViwJBAM6WS5aeKO/JX09O0Ang9Y0+atMKO0YjX6fNFE2UJ5Ewzyr4DMZK 10 | TmBpyzm4x/GhV9ukqcDcd3dNlUOtgRqY3+cCQQDCGmssk1+dUpqBE1rT8CvfqYv+ 11 | eqWWzerwDNSPz3OppK4630Bqby4Z0GNCP8RAUXgDKIuPqAH11HSm17vNcgqLAkA8 12 | 8FCzyUvCD+CxgEoV3+oPFA5m2mnJsr2QvgnzKHTTe1ZhEnKSO3ELN6nfCQbR3AoS 13 | nGwGnAIRiy0wnYmr0tSZAkEAsWFm/D7sTQhX4Qnh15ZDdUn1WSWjBZevUtJnQcpx 14 | TjihZq2sd3uK/XrzG+w7B+cPZlrZtQ94sDSVQwWl/sxB4A== 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /examples/profiles/wss/server_cert/cert.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | 18 | openssl genrsa -out server.key 2048 19 | openssl req -new -x509 -key server.key -out server.crt 20 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/profiles/dev/cert/cert.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | 18 | openssl genrsa -out server.key 2048 19 | openssl req -new -x509 -key server.key -out server.crt 20 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/profiles/release/cert/cert.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | 18 | openssl genrsa -out server.key 2048 19 | openssl req -new -x509 -key server.key -out server.crt 20 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/profiles/test/cert/cert.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | 18 | openssl genrsa -out server.key 2048 19 | openssl req -new -x509 -key server.key -out server.crt 20 | -------------------------------------------------------------------------------- /CHANGE.md: -------------------------------------------------------------------------------- 1 | # Release Notes 2 | --- 3 | 4 | ## 1.4.0 5 | - [Impl: move taskpool at endpoint layer](https://github.com/apache/dubbo-getty/pull/50) 6 | 7 | ## 1.3.x 8 | - [Fix: ExposeMaxWheelTimeSpan](https://github.com/apache/dubbo-getty/pull/46) 9 | - [Impl: tls support](https://github.com/apache/dubbo-getty/pull/44) 10 | - [Fix: send multiple pkgs repetitive](https://github.com/apache/dubbo-getty/pull/39) 11 | - [Impl: StreamServer & PacketServer](https://github.com/apache/dubbo-getty/pull/38) 12 | - [Impl: listen on random local por](https://github.com/apache/dubbo-getty/pull/37) 13 | - [Impl: reduce syscall and memcopy for multiple package](https://github.com/apache/dubbo-getty/pull/36) 14 | - [Impl: enlarge time wheel span](https://github.com/apache/dubbo-getty/commit/a57b22edbb3a7de383ad7a94387000bfd4eca194) 15 | - [Fix: skip the log output of EOF error](https://github.com/apache/dubbo-getty/pull/26) 16 | - [Impl: add travis](https://github.com/apache/dubbo-getty/pull/28) 17 | - [Impl: add writev](https://github.com/apache/dubbo-getty/pull/26) -------------------------------------------------------------------------------- /.asf.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | notifications: 17 | commits: commits@dubbo.apache.org 18 | issues: notifications@dubbo.apache.org 19 | pullrequests: notifications@dubbo.apache.org 20 | jira_options: link label link label 21 | -------------------------------------------------------------------------------- /demo/hello/consts.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package hello 19 | 20 | import ( 21 | "github.com/apache/dubbo-getty" 22 | ) 23 | 24 | const ( 25 | CronPeriod = 20e9 26 | WritePkgTimeout = 1e8 27 | ) 28 | 29 | var log = getty.GetLogger() 30 | -------------------------------------------------------------------------------- /demo/util/pprof.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package util 19 | 20 | import ( 21 | "fmt" 22 | "net/http" 23 | _ "net/http/pprof" 24 | ) 25 | 26 | func Profiling(port int) { 27 | go func() { 28 | _ = http.ListenAndServe(fmt.Sprintf(":%d", port), nil) 29 | }() 30 | } 31 | -------------------------------------------------------------------------------- /demo/hello/tls/certs/client.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIC6TCCAlKgAwIBAgIBCjANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJBVTET 3 | MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ 4 | dHkgTHRkMQ8wDQYDVQQDEwZ0ZXN0Y2EwHhcNMTUxMTEwMDEwOTU4WhcNMjUxMTA3 5 | MDEwOTU4WjBaMQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8G 6 | A1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRMwEQYDVQQDDAp0ZXN0Y2xp 7 | ZW50MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDsVEfbob4W3lVCDLOVmx9K 8 | cdJnoZdvurGaTY87xNiopmaR8zCR7pFR9BX5L4bNG/PkuVLfVTVAKndyDCQggBBr 9 | UTaEITNbfWK9swHJEr20WnKfhS/wo/Xg5sqNNCrFRmnnnwOA4eDlvmYZEzSnJXV6 10 | pEro9bBH9uOCWWLqmaev7QIDAQABo4HCMIG/MAkGA1UdEwQCMAAwCwYDVR0PBAQD 11 | AgXgMB0GA1UdDgQWBBQAdbW5Vml/CnYwqdP3mOHDARU+8zBwBgNVHSMEaTBnoVqk 12 | WDBWMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMY 13 | SW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQ8wDQYDVQQDEwZ0ZXN0Y2GCCQCRxhke 14 | HRoqBzAJBgNVHREEAjAAMAkGA1UdEgQCMAAwDQYJKoZIhvcNAQELBQADgYEAf4MM 15 | k+sdzd720DfrQ0PF2gDauR3M9uBubozDuMuF6ufAuQBJSKGQEGibXbUelrwHmnql 16 | UjTyfolVcxEBVaF4VFHmn7u6vP7S1NexIDdNUHcULqxIb7Tzl8JYq8OOHD2rQy4H 17 | s8BXaVIzw4YcaCGAMS0iDX052Sy7e2JhP8Noxvo= 18 | -----END CERTIFICATE----- 19 | -------------------------------------------------------------------------------- /demo/hello/tls/certs/server0.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIC8zCCAlygAwIBAgIBCzANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJBVTET 3 | MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ 4 | dHkgTHRkMQ8wDQYDVQQDEwZ0ZXN0Y2EwHhcNMTUxMTEwMDExNDU1WhcNMjUxMTA3 5 | MDExNDU1WjBkMQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8G 6 | A1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMR0wGwYDVQQDDBQqLnRlc3Qu 7 | Z29vZ2xlLmNvbS5hdTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA06Z9+6kg 8 | YLxgNq6s4Xh4qcfA+zOCmSSFbMqxXGE0MHEJVjHhMSMbRdYg7SLJFe6lltQL7s3/ 9 | wecRU1rwXWNiGeDXgiKr31w1Btue4ceEjO2amhyslPGaeEbOgCdFrVNv4acC5Ggg 10 | dED9XZxVQT21uKRC6AXH9I+BcDDq19YH5i8CAwEAAaOBwjCBvzAJBgNVHRMEAjAA 11 | MAsGA1UdDwQEAwIF4DAdBgNVHQ4EFgQUbyZIbUvqmePzv40xa0mMaDxLToYwcAYD 12 | VR0jBGkwZ6FapFgwVjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUx 13 | ITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEPMA0GA1UEAxMGdGVz 14 | dGNhggkAkcYZHh0aKgcwCQYDVR0RBAIwADAJBgNVHRIEAjAAMA0GCSqGSIb3DQEB 15 | CwUAA4GBAJ21MwMf4WwAjafPKn+8Ng7ordtdp6tlkjt+Xub4l4zMr6FCp6dc/Ceh 16 | 6Hj43zYcKpAe5I6eaVcMc9qcYfUb9i4NVX82dMQpAwpNHgqTzqYt6GYEjF3YhKA7 17 | uOFdA0OvOFJa14SNdNRk9E1Cd/tElXnLnSE4DOguMNvXz8mRKfnD 18 | -----END CERTIFICATE----- 19 | -------------------------------------------------------------------------------- /demo/util/signals.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package util 19 | 20 | import ( 21 | "os" 22 | "os/signal" 23 | "syscall" 24 | ) 25 | 26 | type Closer interface { 27 | Close() 28 | } 29 | 30 | func WaitCloseSignals(closer Closer) { 31 | signals := make(chan os.Signal, 1) 32 | signal.Notify(signals, os.Interrupt, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT) 33 | <-signals 34 | closer.Close() 35 | } 36 | -------------------------------------------------------------------------------- /demo/util/limit_linux.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package util 19 | 20 | import ( 21 | "syscall" 22 | ) 23 | 24 | func SetLimit() { 25 | var rLimit syscall.Rlimit 26 | if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit); err != nil { 27 | panic(err) 28 | } 29 | rLimit.Cur = rLimit.Max 30 | if err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit); err != nil { 31 | panic(err) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /before_validate_license.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | remoteLicenseCheckerPath="https://github.com/dubbogo/resources/raw/master/tools/license" 18 | remoteLicenseCheckerName="license-header-checker" 19 | remoteLicenseCheckerURL="${remoteLicenseCheckerPath}/${remoteLicenseCheckerName}" 20 | remoteLicenseName="license.txt" 21 | remoteLicenseURL="${remoteLicenseCheckerPath}/${remoteLicenseName}" 22 | 23 | licensePath="/tmp/tools/license" 24 | mkdir -p ${licensePath} 25 | wget -P "${licensePath}" ${remoteLicenseCheckerURL} 26 | wget -P "${licensePath}" ${remoteLicenseURL} 27 | -------------------------------------------------------------------------------- /demo/hello/hello.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package hello 19 | 20 | import ( 21 | "github.com/apache/dubbo-getty" 22 | ) 23 | 24 | var Sessions []getty.Session 25 | 26 | func ClientRequest() { 27 | for _, session := range Sessions { 28 | ss := session 29 | go func() { 30 | echoTimes := 10 31 | for i := 0; i < echoTimes; i++ { 32 | _, _, err := ss.WritePkg("hello", WritePkgTimeout) 33 | if err != nil { 34 | log.Infof("session.WritePkg(session{%s}, error{%v}", ss.Stat(), err) 35 | ss.Close() 36 | } 37 | } 38 | log.Infof("after loop %d times", echoTimes) 39 | }() 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/apache/dubbo-getty 2 | 3 | go 1.23 4 | 5 | require ( 6 | github.com/dubbogo/gost v1.13.1 7 | github.com/golang/snappy v0.0.1 8 | github.com/gorilla/websocket v1.4.2 9 | github.com/koding/multiconfig v0.0.0-20171124222453-69c27309b2d7 10 | github.com/montanaflynn/stats v0.6.6 11 | github.com/pkg/errors v0.9.1 12 | github.com/stretchr/testify v1.7.0 13 | go.uber.org/atomic v1.9.0 14 | go.uber.org/zap v1.21.0 15 | gopkg.in/yaml.v2 v2.4.0 16 | ) 17 | 18 | require ( 19 | github.com/BurntSushi/toml v0.3.1 // indirect 20 | github.com/davecgh/go-spew v1.1.1 // indirect 21 | github.com/fatih/camelcase v1.0.0 // indirect 22 | github.com/fatih/structs v1.1.0 // indirect 23 | github.com/go-ole/go-ole v1.2.6 // indirect 24 | github.com/k0kubun/pp v3.0.1+incompatible // indirect 25 | github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect 26 | github.com/mattn/go-colorable v0.0.9 // indirect 27 | github.com/mattn/go-isatty v0.0.14 // indirect 28 | github.com/pmezard/go-difflib v1.0.0 // indirect 29 | github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect 30 | github.com/shirou/gopsutil/v3 v3.22.2 // indirect 31 | github.com/tklauser/go-sysconf v0.3.10 // indirect 32 | github.com/tklauser/numcpus v0.4.0 // indirect 33 | github.com/yusufpapurcu/wmi v1.2.2 // indirect 34 | go.uber.org/multierr v1.6.0 // indirect 35 | golang.org/x/sys v0.1.0 // indirect 36 | gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect 37 | ) 38 | -------------------------------------------------------------------------------- /examples/build_all.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | 18 | cd echo/tcp-echo/client && sh assembly/mac/dev.sh && rm -rf target && cd - 19 | cd echo/tcp-echo/server && sh assembly/mac/dev.sh && rm -rf target && cd - 20 | 21 | cd echo/udp-echo/client && sh assembly/mac/dev.sh && rm -rf target && cd - 22 | cd echo/udp-echo/server && sh assembly/mac/dev.sh && rm -rf target && cd - 23 | 24 | cd echo/ws-echo/client && sh assembly/mac/dev.sh && rm -rf target && cd - 25 | cd echo/ws-echo/server && sh assembly/mac/dev.sh && rm -rf target && cd - 26 | 27 | cd echo/wss-echo/client && sh assembly/mac/dev.sh && rm -rf target && cd - 28 | cd echo/wss-echo/server && sh assembly/mac/dev.sh && rm -rf target && cd - 29 | -------------------------------------------------------------------------------- /.licenserc.yaml: -------------------------------------------------------------------------------- 1 | header: 2 | license: 3 | spdx-id: Apache-2.0 4 | content: | 5 | Licensed to the Apache Software Foundation (ASF) under one or more 6 | contributor license agreements. See the NOTICE file distributed with 7 | this work for additional information regarding copyright ownership. 8 | The ASF licenses this file to You under the Apache License, Version 2.0 9 | (the "License"); you may not use this file except in compliance with 10 | the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, software 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | paths-ignore: 21 | - '**/*.md' 22 | - '**/*.json' 23 | - '**/*.properties' 24 | - '**/*.proto' 25 | - '**/*.tpl' 26 | - '**/*.crt' 27 | - '**/*.key' 28 | - '**/*.pem' 29 | - '**/*.js' 30 | - '**/*.css' 31 | - '**/go.mod' 32 | - '**/go.sum' 33 | - '.git/' 34 | - '.github/**' 35 | - '.gitignore' 36 | - '.gitmodules' 37 | - 'LICENSE' 38 | - 'NOTICE' 39 | 40 | comment: on-failure 41 | 42 | # If you don't want to check dependencies' license compatibility, remove the following part 43 | dependency: 44 | files: 45 | - go.mod 46 | 47 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/js-client/index.html: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 21 | 22 | Echo Example 23 | 24 | 25 | 26 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/js-client/index.html: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 21 | 22 | Echo Example 23 | 24 | 25 | 26 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/assembly/windows/win32.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=386 32 | 33 | PROFILE=test 34 | 35 | PROJECT_HOME=`pwd` 36 | 37 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 38 | . ${PROJECT_HOME}/assembly/common/app.properties 39 | fi 40 | 41 | 42 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 43 | . ${PROJECT_HOME}/assembly/common/build.sh 44 | fi 45 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/assembly/windows/win32.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=386 32 | 33 | PROFILE=test 34 | 35 | PROJECT_HOME=`pwd` 36 | 37 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 38 | . ${PROJECT_HOME}/assembly/common/app.properties 39 | fi 40 | 41 | 42 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 43 | . ${PROJECT_HOME}/assembly/common/build.sh 44 | fi 45 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/client/assembly/linux/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/client/assembly/mac/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/client/assembly/windows/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/server/assembly/linux/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/server/assembly/mac/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/server/assembly/windows/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/client/assembly/linux/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/client/assembly/mac/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/client/assembly/windows/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/server/assembly/linux/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/server/assembly/mac/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/server/assembly/windows/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/assembly/linux/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/assembly/mac/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/assembly/windows/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/server/assembly/linux/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/server/assembly/mac/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/server/assembly/windows/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/assembly/linux/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/assembly/mac/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/assembly/windows/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/assembly/linux/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/assembly/mac/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/assembly/windows/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for dev env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : dev.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="dev" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/client/assembly/linux/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/client/assembly/mac/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/client/assembly/windows/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/server/assembly/linux/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/server/assembly/mac/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/client/assembly/linux/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/client/assembly/mac/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/client/assembly/windows/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/server/assembly/linux/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/server/assembly/mac/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/assembly/linux/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/assembly/mac/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/assembly/mac/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/assembly/windows/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/server/assembly/linux/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/server/assembly/mac/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/server/assembly/mac/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/assembly/linux/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/assembly/mac/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/assembly/windows/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/assembly/linux/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/assembly/mac/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/client/assembly/linux/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/client/assembly/mac/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/server/assembly/linux/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/server/assembly/mac/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/server/assembly/windows/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/client/assembly/linux/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/client/assembly/mac/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/server/assembly/linux/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/server/assembly/mac/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/server/assembly/windows/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/assembly/linux/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/client/assembly/windows/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/server/assembly/linux/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/server/assembly/windows/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/server/assembly/windows/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/assembly/linux/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/assembly/mac/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/assembly/linux/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=linux 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/assembly/mac/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=darwin 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/assembly/windows/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for test env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="test" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | 41 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 42 | sh ${PROJECT_HOME}/assembly/common/build.sh 43 | fi 44 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/client/assembly/windows/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/server/assembly/windows/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/client/assembly/windows/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/server/assembly/windows/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/client/assembly/windows/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/server/assembly/windows/release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # ****************************************************** 18 | # DESC : build script for release env 19 | # AUTHOR : Alex Stocks 20 | # VERSION : 1.0 21 | # LICENCE : Apache License 2.0 22 | # EMAIL : alexstocks@foxmail.com 23 | # MOD : 2016-07-12 16:34 24 | # FILE : test.sh 25 | # ****************************************************** 26 | 27 | 28 | set -e 29 | 30 | export GOOS=windows 31 | export GOARCH=amd64 32 | 33 | export PROFILE="release" 34 | export PROJECT_HOME=`pwd` 35 | 36 | if [ -f "${PROJECT_HOME}/assembly/common/app.properties" ]; then 37 | . ${PROJECT_HOME}/assembly/common/app.properties 38 | fi 39 | 40 | if [ -f "${PROJECT_HOME}/assembly/common/build.sh" ]; then 41 | sh ${PROJECT_HOME}/assembly/common/build.sh 42 | fi 43 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | language: go 17 | 18 | os: 19 | - linux 20 | 21 | go: 22 | - "1.13" 23 | 24 | env: 25 | - GO111MODULE=on 26 | 27 | install: true 28 | 29 | script: 30 | # license-check 31 | - echo 'start license check' 32 | - sh before_validate_license.sh 33 | - chmod u+x /tmp/tools/license/license-header-checker 34 | - go fmt ./... && [[ -z `git status -s` ]] 35 | - /tmp/tools/license/license-header-checker -v -a -r -i vendor /tmp/tools/license/license.txt . go && [[ -z `git status -s` ]] 36 | - go mod vendor && go test $(go list ./... | grep -v vendor | grep -v demo) -coverprofile=coverage.txt -covermode=atomic 37 | 38 | after_success: 39 | - bash <(curl -s https://codecov.io/bash) 40 | 41 | notifications: 42 | webhooks: https://oapi.dingtalk.com/robot/send?access_token=75f4f1ec3868508aa89e5a5d6f9d342216809df3ebc8a78c8ae8722848e06166 -------------------------------------------------------------------------------- /examples/echo/tcp-echo/server/profiles/dev/config.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # server yaml configure file 17 | app_name : "ECHO-SERVER" 18 | host : "127.0.0.1" 19 | ports : ["10000", "20000"] 20 | profile_port : 10086 21 | 22 | # session 23 | # client与server之间连接的超时时间 24 | session_timeout : "20s" 25 | session_number : 700 26 | 27 | # app 28 | fail_fast_timeout : "3s" 29 | 30 | # tcp 31 | getty_session_param: 32 | compress_encoding : true 33 | tcp_no_delay : true 34 | tcp_keep_alive : true 35 | keep_alive_period : "120s" 36 | tcp_r_buf_size : 262144 37 | tcp_w_buf_size : 524288 38 | pkg_rq_size : 1024 39 | pkg_wq_size : 512 40 | tcp_read_timeout : "1s" 41 | tcp_write_timeout : "5s" 42 | wait_timeout : "1s" 43 | max_msg_len : 128 44 | session_name : "echo-server" 45 | 46 | task_queue_length : 1024 47 | task_queue_number : 20 48 | task_pool_size : 1000 -------------------------------------------------------------------------------- /examples/echo/tcp-echo/server/profiles/release/config.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # server yaml configure file 17 | app_name : "ECHO-SERVER" 18 | host : "127.0.0.1" 19 | ports : ["10000", "20000"] 20 | profile_port : 10086 21 | 22 | # session 23 | # client与server之间连接的超时时间 24 | session_timeout : "20s" 25 | session_number : 700 26 | 27 | # app 28 | fail_fast_timeout : "3s" 29 | 30 | # tcp 31 | getty_session_param: 32 | compress_encoding : true 33 | tcp_no_delay : true 34 | tcp_keep_alive : true 35 | keep_alive_period : "120s" 36 | tcp_r_buf_size : 262144 37 | tcp_w_buf_size : 524288 38 | pkg_rq_size : 1024 39 | pkg_wq_size : 512 40 | tcp_read_timeout : "1s" 41 | tcp_write_timeout : "5s" 42 | wait_timeout : "1s" 43 | max_msg_len : 128 44 | session_name : "echo-server" 45 | 46 | task_queue_length : 1024 47 | task_queue_number : 20 48 | task_pool_size : 1000 -------------------------------------------------------------------------------- /examples/echo/tcp-echo/server/profiles/test/config.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # server yaml configure file 17 | app_name : "ECHO-SERVER" 18 | host : "127.0.0.1" 19 | ports : ["10000", "20000"] 20 | profile_port : 10086 21 | 22 | # session 23 | # client与server之间连接的超时时间 24 | session_timeout : "20s" 25 | session_number : 700 26 | 27 | # app 28 | fail_fast_timeout : "3s" 29 | 30 | # tcp 31 | getty_session_param: 32 | compress_encoding : true 33 | tcp_no_delay : true 34 | tcp_keep_alive : true 35 | keep_alive_period : "120s" 36 | tcp_r_buf_size : 262144 37 | tcp_w_buf_size : 524288 38 | pkg_rq_size : 1024 39 | pkg_wq_size : 512 40 | tcp_read_timeout : "1s" 41 | tcp_write_timeout : "5s" 42 | wait_timeout : "1s" 43 | max_msg_len : 128 44 | session_name : "echo-server" 45 | 46 | task_queue_length : 1024 47 | task_queue_number : 20 48 | task_pool_size : 1000 -------------------------------------------------------------------------------- /examples/echo/udp-echo/server/profiles/dev/config.toml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # toml configure file 17 | # toml中key的首字母可以小写,但是对应的golang中的struct成员首字母必须大写 18 | 19 | AppName = "ECHO-SERVER" 20 | 21 | Host = "127.0.0.1" 22 | # Host = "192.168.35.1" 23 | # Host = "192.168.8.3" 24 | # Ports = ["10000", "20000"] 25 | Ports = ["10000"] 26 | ProfilePort = 10086 27 | 28 | # session 29 | # client与server之间连接的超时时间 30 | SessionTimeout = "20s" 31 | SessionNumber = 700 32 | 33 | # app 34 | FailFastTimeout = "3s" 35 | 36 | # tcp 37 | [GettySessionParam] 38 | CompressEncoding = true 39 | UdpRBufSize = 262144 40 | UdpWBufSize = 524288 41 | PkgWQSize = 512 42 | UdpReadTimeout = "10s" 43 | UdpWriteTimeout = "5s" 44 | WaitTimeout = "1s" 45 | MaxMsgLen = 128 46 | SessionName = "echo-server" 47 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/server/profiles/release/config.toml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # toml configure file 17 | # toml中key的首字母可以小写,但是对应的golang中的struct成员首字母必须大写 18 | 19 | AppName = "ECHO-SERVER" 20 | 21 | Host = "127.0.0.1" 22 | # Host = "192.168.35.1" 23 | # Host = "192.168.8.3" 24 | # Ports = ["10000", "20000"] 25 | Ports = ["10000"] 26 | ProfilePort = 10086 27 | 28 | # session 29 | # client与server之间连接的超时时间 30 | SessionTimeout = "20s" 31 | SessionNumber = 700 32 | 33 | # app 34 | FailFastTimeout = "3s" 35 | 36 | # tcp 37 | [GettySessionParam] 38 | CompressEncoding = true 39 | UdpRBufSize = 262144 40 | UdpWBufSize = 524288 41 | PkgWQSize = 512 42 | UdpReadTimeout = "10s" 43 | UdpWriteTimeout = "5s" 44 | WaitTimeout = "1s" 45 | MaxMsgLen = 128 46 | SessionName = "echo-server" 47 | -------------------------------------------------------------------------------- /examples/echo/udp-echo/server/profiles/test/config.toml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # toml configure file 17 | # toml中key的首字母可以小写,但是对应的golang中的struct成员首字母必须大写 18 | 19 | AppName = "ECHO-SERVER" 20 | 21 | Host = "127.0.0.1" 22 | # Host = "192.168.35.1" 23 | # Host = "192.168.8.3" 24 | # Ports = ["10000", "20000"] 25 | Ports = ["10000"] 26 | ProfilePort = 10086 27 | 28 | # session 29 | # client与server之间连接的超时时间 30 | SessionTimeout = "20s" 31 | SessionNumber = 700 32 | 33 | # app 34 | FailFastTimeout = "3s" 35 | 36 | # tcp 37 | [GettySessionParam] 38 | CompressEncoding = true 39 | UdpRBufSize = 262144 40 | UdpWBufSize = 524288 41 | PkgWQSize = 512 42 | UdpReadTimeout = "10s" 43 | UdpWriteTimeout = "5s" 44 | WaitTimeout = "1s" 45 | MaxMsgLen = 128 46 | SessionName = "echo-server" 47 | -------------------------------------------------------------------------------- /demo/hello/tls/config.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package tcp 19 | 20 | import ( 21 | "crypto/tls" 22 | "time" 23 | ) 24 | 25 | import ( 26 | "github.com/apache/dubbo-getty" 27 | "github.com/apache/dubbo-getty/demo/hello" 28 | ) 29 | 30 | var ( 31 | pkgHandler = &hello.PackageHandler{} 32 | // EventListener register event callback 33 | EventListener = &hello.MessageHandler{} 34 | ) 35 | 36 | // InitialSession init session 37 | func InitialSession(session getty.Session) (err error) { 38 | // session.SetCompressType(getty.CompressZip) 39 | _, ok := session.Conn().(*tls.Conn) 40 | if ok { 41 | session.SetName("hello") 42 | session.SetMaxMsgLen(128 * 1024) // max message package length is 128k 43 | session.SetReadTimeout(time.Second) 44 | session.SetWriteTimeout(5 * time.Second) 45 | session.SetCronPeriod(int(hello.CronPeriod / 1e6)) 46 | session.SetWaitTime(time.Second) 47 | 48 | session.SetPkgHandler(pkgHandler) 49 | session.SetEventListener(EventListener) 50 | } 51 | return nil 52 | } 53 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/js-client/style.css: -------------------------------------------------------------------------------- 1 | /* Fix user-agent */ 2 | 3 | * { 4 | box-sizing: border-box; 5 | } 6 | 7 | html { 8 | font-weight: 300; 9 | -webkit-font-smoothing: antialiased; 10 | } 11 | 12 | html, input { 13 | font-family: 14 | "HelveticaNeue-Light", 15 | "Helvetica Neue Light", 16 | "Helvetica Neue", 17 | Helvetica, 18 | Arial, 19 | "Lucida Grande", 20 | sans-serif; 21 | } 22 | 23 | html, body { 24 | height: 100%; 25 | margin: 0; 26 | padding: 0; 27 | } 28 | 29 | ul { 30 | list-style: none; 31 | word-wrap: break-word; 32 | } 33 | 34 | /* Pages */ 35 | 36 | .pages { 37 | height: 100%; 38 | margin: 0; 39 | padding: 0; 40 | width: 100%; 41 | } 42 | 43 | .page { 44 | height: 100%; 45 | position: absolute; 46 | width: 100%; 47 | } 48 | /* Chat page */ 49 | /* Font */ 50 | 51 | .messages { 52 | font-size: 150%; 53 | } 54 | 55 | .inputMessage { 56 | font-size: 100%; 57 | } 58 | 59 | .log { 60 | color: gray; 61 | font-size: 70%; 62 | margin: 5px; 63 | text-align: center; 64 | } 65 | 66 | /* Messages */ 67 | 68 | .chatArea { 69 | height: 100%; 70 | padding-bottom: 60px; 71 | } 72 | 73 | .messages { 74 | height: 100%; 75 | margin: 0; 76 | overflow-y: scroll; 77 | padding: 10px 20px 10px 20px; 78 | } 79 | 80 | .message.typing .messageBody { 81 | color: gray; 82 | } 83 | 84 | .username { 85 | float: left; 86 | font-weight: 700; 87 | overflow: hidden; 88 | padding-right: 15px; 89 | text-align: right; 90 | } 91 | 92 | /* Input */ 93 | 94 | .inputMessage { 95 | border: 10px solid #000; 96 | bottom: 0; 97 | height: 60px; 98 | left: 0; 99 | outline: none; 100 | padding-left: 10px; 101 | position: absolute; 102 | right: 0; 103 | width: 100%; 104 | } 105 | -------------------------------------------------------------------------------- /examples/echo/wss-echo/js-client/style.css: -------------------------------------------------------------------------------- 1 | /* Fix user-agent */ 2 | 3 | * { 4 | box-sizing: border-box; 5 | } 6 | 7 | html { 8 | font-weight: 300; 9 | -webkit-font-smoothing: antialiased; 10 | } 11 | 12 | html, input { 13 | font-family: 14 | "HelveticaNeue-Light", 15 | "Helvetica Neue Light", 16 | "Helvetica Neue", 17 | Helvetica, 18 | Arial, 19 | "Lucida Grande", 20 | sans-serif; 21 | } 22 | 23 | html, body { 24 | height: 100%; 25 | margin: 0; 26 | padding: 0; 27 | } 28 | 29 | ul { 30 | list-style: none; 31 | word-wrap: break-word; 32 | } 33 | 34 | /* Pages */ 35 | 36 | .pages { 37 | height: 100%; 38 | margin: 0; 39 | padding: 0; 40 | width: 100%; 41 | } 42 | 43 | .page { 44 | height: 100%; 45 | position: absolute; 46 | width: 100%; 47 | } 48 | /* Chat page */ 49 | /* Font */ 50 | 51 | .messages { 52 | font-size: 150%; 53 | } 54 | 55 | .inputMessage { 56 | font-size: 100%; 57 | } 58 | 59 | .log { 60 | color: gray; 61 | font-size: 70%; 62 | margin: 5px; 63 | text-align: center; 64 | } 65 | 66 | /* Messages */ 67 | 68 | .chatArea { 69 | height: 100%; 70 | padding-bottom: 60px; 71 | } 72 | 73 | .messages { 74 | height: 100%; 75 | margin: 0; 76 | overflow-y: scroll; 77 | padding: 10px 20px 10px 20px; 78 | } 79 | 80 | .message.typing .messageBody { 81 | color: gray; 82 | } 83 | 84 | .username { 85 | float: left; 86 | font-weight: 700; 87 | overflow: hidden; 88 | padding-right: 15px; 89 | text-align: right; 90 | } 91 | 92 | /* Input */ 93 | 94 | .inputMessage { 95 | border: 10px solid #000; 96 | bottom: 0; 97 | height: 60px; 98 | left: 0; 99 | outline: none; 100 | padding-left: 10px; 101 | position: absolute; 102 | right: 0; 103 | width: 100%; 104 | } 105 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # getty 2 | 3 | *a netty like asynchronous network I/O library* 4 | 5 | [![Build Status](https://travis-ci.org/dubbogo/getty.svg?branch=master)](https://travis-ci.org/dubbogo/getty) 6 | [![codecov](https://codecov.io/gh/dubbogo/getty/branch/master/graph/badge.svg)](https://codecov.io/gh/dubbogo/getty) 7 | [![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/dubbogo/getty?tab=doc) 8 | [![Go Report Card](https://goreportcard.com/badge/github.com/dubbogo/getty)](https://goreportcard.com/report/github.com/dubbogo/getty) 9 | ![license](https://img.shields.io/badge/license-Apache--2.0-green.svg) 10 | 11 | ## INTRO 12 | 13 | Getty is a asynchronous network I/O library in golang. Getty works on tcp/udp/websocket network protocol and supplies [a uniform interface](https://github.com/dubbogo/getty/blob/master/getty.go#L45). 14 | 15 | In getty there are two goroutines in one connection(session), one reads tcp stream/udp packet/websocket package, the other handles logic process and writes response into network write buffer. If your logic process may take a long time, you should start a new logic process goroutine by yourself in codec.go:(Codec)OnMessage. 16 | 17 | You can also handle heartbeat logic in codec.go:(Codec):OnCron. If you use tcp/udp, you should send hearbeat package by yourself, and then invoke session.go:(Session)UpdateActive to update its active time. Please check whether the tcp session has been timeout or not in codec.go:(Codec)OnCron by session.go:(Session)GetActive. 18 | 19 | Whatever if you use websocket, you do not need to care about hearbeat request/response because Getty do this task in session.go:(Session)handleLoop by sending/received websocket ping/pong frames. You just need to check whether the websocket session has been timeout or not in codec.go:(Codec)OnCron by session.go:(Session)GetActive. 20 | 21 | ## LICENCE 22 | 23 | Apache License 2.0 24 | 25 | -------------------------------------------------------------------------------- /examples/echo/tcp-echo/client/profiles/release/config.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # yaml configure file 17 | app_name : "ECHO-CLIENT" 18 | 19 | # host 20 | local_host : "127.0.0.1" 21 | 22 | # server 23 | server_host : "127.0.0.1" 24 | server_port : 10000 25 | 26 | profile_port : 20080 27 | 28 | # connection pool 29 | # 连接池连接数目 30 | connection_number : 2 31 | 32 | # session 33 | # client与server之间连接的心跳周期 34 | heartbeat_period : "10s" 35 | # client与server之间连接的超时时间 36 | session_timeout : "20s" 37 | 38 | # client 39 | # client echo request string 40 | echo_string : "Hello, getty!" 41 | # 发送echo请求次数 42 | echo_times : 10000 43 | 44 | # app fail fast 45 | fail_fast_timeout : "3s" 46 | 47 | # tcp 48 | getty_session_param: 49 | compress_encoding : true 50 | tcp_no_delay : true 51 | tcp_keep_alive : true 52 | keep_alive_period : "120s" 53 | tcp_r_buf_size : 262144 54 | tcp_w_buf_size : 65536 55 | pkg_rq_size : 512 56 | pkg_wq_size : 256 57 | tcp_read_timeout : "1s" 58 | tcp_write_timeout : "5s" 59 | wait_timeout : "1s" 60 | max_msg_len : 128 61 | session_name : "echo-client" 62 | 63 | task_queue_length : 1024 64 | task_queue_number : 20 65 | task_pool_size : 1000 -------------------------------------------------------------------------------- /examples/echo/tcp-echo/client/profiles/test/config.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # yaml configure file 17 | app_name : "ECHO-CLIENT" 18 | 19 | # host 20 | local_host : "127.0.0.1" 21 | 22 | # server 23 | server_host : "127.0.0.1" 24 | server_port : 10000 25 | 26 | profile_port : 20080 27 | 28 | # connection pool 29 | # 连接池连接数目 30 | connection_number : 2 31 | 32 | # session 33 | # client与server之间连接的心跳周期 34 | heartbeat_period : "10s" 35 | # client与server之间连接的超时时间 36 | session_timeout : "20s" 37 | 38 | # client 39 | # client echo request string 40 | echo_string : "Hello, getty!" 41 | # 发送echo请求次数 42 | echo_times : 10000 43 | 44 | # app fail fast 45 | fail_fast_timeout : "3s" 46 | 47 | # tcp 48 | getty_session_param: 49 | compress_encoding : true 50 | tcp_no_delay : true 51 | tcp_keep_alive : true 52 | keep_alive_period : "120s" 53 | tcp_r_buf_size : 262144 54 | tcp_w_buf_size : 65536 55 | pkg_rq_size : 512 56 | pkg_wq_size : 256 57 | tcp_read_timeout : "1s" 58 | tcp_write_timeout : "5s" 59 | wait_timeout : "1s" 60 | max_msg_len : 128 61 | session_name : "echo-client" 62 | 63 | task_queue_length : 1024 64 | task_queue_number : 20 65 | task_pool_size : 1000 -------------------------------------------------------------------------------- /examples/echo/tcp-echo/client/profiles/dev/config.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # yaml configure file 17 | app_name : "ECHO-CLIENT" 18 | 19 | # host 20 | local_host : "127.0.0.1" 21 | 22 | # server 23 | server_host : "127.0.0.1" 24 | server_port : 10000 25 | 26 | profile_port : 20080 27 | 28 | # connection pool 29 | # 连接池连接数目 30 | connection_number : 2 31 | 32 | # session 33 | # client与server之间连接的心跳周期 34 | heartbeat_period : "10s" 35 | # client与server之间连接的超时时间 36 | session_timeout : "20s" 37 | 38 | # client 39 | # client echo request string 40 | echo_string : "Hello, getty!" 41 | # 发送echo请求次数 42 | echo_times : 10000 43 | 44 | # app fail fast 45 | fail_fast_timeout : "3s" 46 | 47 | # tcp 48 | getty_session_param: 49 | compress_encoding : true 50 | tcp_no_delay : true 51 | tcp_keep_alive : true 52 | keep_alive_period : "120s" 53 | tcp_r_buf_size : 262144 54 | tcp_w_buf_size : 65536 55 | pkg_rq_size : 512 56 | pkg_wq_size : 256 57 | tcp_read_timeout : "1s" 58 | tcp_write_timeout : "5s" 59 | wait_timeout : "1s" 60 | max_msg_len : 128 61 | session_name : "echo-client" 62 | 63 | task_queue_length : 1024 64 | task_queue_number : 20 65 | task_pool_size : 1000 66 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/server/profiles/dev/config.toml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # toml configure file 17 | # toml中key的首字母可以小写,但是对应的golang中的struct成员首字母必须大写 18 | 19 | AppName = "ECHO-SERVER" 20 | 21 | # Host = "0.0.0.0" 22 | # Host = "127.0.0.1" 23 | # Host = "192.168.35.1" 24 | Host = "localhost" 25 | Ports = ["10000", "20000"] 26 | Paths = ["/echo", "/echo"] 27 | ProfilePort = 10086 28 | 29 | # session 30 | # client与server之间连接的心跳周期 31 | HeartbeatPeriod = "10s" 32 | # client与server之间连接的超时时间 33 | SessionTimeout = "20s" 34 | # client与server之间连接的最大连接数 35 | SessionNumber = 700 36 | 37 | # app 38 | FailFastTimeout = "3s" 39 | 40 | # tcp 41 | [GettySessionParam] 42 | CompressEncoding = true 43 | TcpNoDelay = true 44 | TcpKeepAlive = true 45 | TcpRBufSize = 262144 46 | TcpWBufSize = 524288 47 | PkgWQSize = 512 48 | TcpReadTimeout = "1s" 49 | TcpWriteTimeout = "5s" 50 | WaitTimeout = "1s" 51 | MaxMsgLen = 128 52 | SessionName = "echo-server" 53 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/server/profiles/test/config.toml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # toml configure file 17 | # toml中key的首字母可以小写,但是对应的golang中的struct成员首字母必须大写 18 | 19 | AppName = "ECHO-SERVER" 20 | 21 | # Host = "0.0.0.0" 22 | # Host = "127.0.0.1" 23 | # Host = "192.168.35.1" 24 | Host = "localhost" 25 | Ports = ["10000", "20000"] 26 | Paths = ["/echo", "/echo"] 27 | ProfilePort = 10086 28 | 29 | # session 30 | # client与server之间连接的心跳周期 31 | HeartbeatPeriod = "10s" 32 | # client与server之间连接的超时时间 33 | SessionTimeout = "20s" 34 | # client与server之间连接的最大连接数 35 | SessionNumber = 700 36 | 37 | # app 38 | FailFastTimeout = "3s" 39 | 40 | # tcp 41 | [GettySessionParam] 42 | CompressEncoding = true 43 | TcpNoDelay = true 44 | TcpKeepAlive = true 45 | TcpRBufSize = 262144 46 | TcpWBufSize = 524288 47 | PkgWQSize = 512 48 | TcpReadTimeout = "1s" 49 | TcpWriteTimeout = "5s" 50 | WaitTimeout = "1s" 51 | MaxMsgLen = 128 52 | SessionName = "echo-server" 53 | -------------------------------------------------------------------------------- /examples/echo/ws-echo/server/profiles/release/config.toml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # toml configure file 17 | # toml中key的首字母可以小写,但是对应的golang中的struct成员首字母必须大写 18 | 19 | AppName = "ECHO-SERVER" 20 | 21 | # Host = "0.0.0.0" 22 | # Host = "127.0.0.1" 23 | # Host = "192.168.35.1" 24 | Host = "localhost" 25 | Ports = ["10000", "20000"] 26 | Paths = ["/echo", "/echo"] 27 | ProfilePort = 10086 28 | 29 | # session 30 | # client与server之间连接的心跳周期 31 | HeartbeatPeriod = "10s" 32 | # client与server之间连接的超时时间 33 | SessionTimeout = "20s" 34 | # client与server之间连接的最大连接数 35 | SessionNumber = 700 36 | 37 | # app 38 | FailFastTimeout = "3s" 39 | 40 | # tcp 41 | [GettySessionParam] 42 | CompressEncoding = true 43 | TcpNoDelay = true 44 | TcpKeepAlive = true 45 | TcpRBufSize = 262144 46 | TcpWBufSize = 524288 47 | PkgWQSize = 512 48 | TcpReadTimeout = "1s" 49 | TcpWriteTimeout = "5s" 50 | WaitTimeout = "1s" 51 | MaxMsgLen = 128 52 | SessionName = "echo-server" 53 | --------------------------------------------------------------------------------