This commit is contained in:
aixianling
2024-12-13 13:41:02 +08:00
commit 06658f112f
3887 changed files with 2687822 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
GateServer =
{
--逻辑网关
{
--监听:客户端连接
LocalService =
{
ServerName = "BeiJiaan网关服",
Address = "0.0.0.0",
Port = 9901,
MaxSession = 8192,--网关中客户端连接池的最大连接数
SendThreadCount = 2,--数据发送线程池中工作线程数量
},
--连接:逻辑服务器
BackServer =
{
Host = "127.0.0.1",
Port = 23002
},
},
}

Binary file not shown.

View File

@@ -0,0 +1,7 @@
#! /bin/bash
path=`pwd`
if [ "$1" == "Debug" ]; then
$path/robootgate_d GateServerLinux.txt
else
$path/robootgate_r GateServerLinux.txt
fi

View File

@@ -0,0 +1,31 @@
#!/bin/bash
cd $(cd "$(dirname "$0")" && pwd)
path=`pwd`
datetime=`date "+%Y-%m-%d.%H:%M:%S"`
curdoc=$(pwd|awk -F \/ '{print $NF}')
#关闭基础服务
arr_srv="robootgate"
for srv in ${arr_srv[@]};
do
pid=`ps aux |grep $path|grep $srv|grep -v grep|grep "\<$curdoc\>"|grep -v "/bin/bash"|awk '{print $2}'`
if [[ -n $pid ]]; then
echo "开始结束服务器: $srv (pid=$pid)"
kill -15 $pid
while true; do
datetime=`date "+%Y-%m-%d.%H:%M:%S"`
proc=`ps aux |grep $path|grep $srv|grep -v grep|grep "\<$curdoc\>"|grep -v "/bin/bash"|wc -l`
if [ $proc == 0 ];
then
break
fi
echo $datetime" 游戏服务 "$path" "$srv" 结束中..."
sleep 1
done
echo "已结束服务器: $srv"
fi
done
exit 0