init
This commit is contained in:
22
server/build/RobotGate/GateServerLinux.txt
Normal file
22
server/build/RobotGate/GateServerLinux.txt
Normal 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
|
||||
},
|
||||
},
|
||||
}
|
||||
BIN
server/build/RobotGate/robootgate_r
Normal file
BIN
server/build/RobotGate/robootgate_r
Normal file
Binary file not shown.
7
server/build/RobotGate/run.sh
Normal file
7
server/build/RobotGate/run.sh
Normal 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
|
||||
31
server/build/RobotGate/stop.sh
Normal file
31
server/build/RobotGate/stop.sh
Normal 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
|
||||
Reference in New Issue
Block a user