Skip to content

Commit d052664

Browse files
author
bruce
committed
[update] 重写房间逻辑
1 parent fa6d4c7 commit d052664

14 files changed

+1050
-759
lines changed

main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
var (
3434
nodeId = flag.Uint64("id", 0, "id")
3535
configFile = flag.String("config", "config.xml", "config file")
36-
gWeb = flag.String("web", "", "web listen address")
36+
gWeb = flag.String("web", ":10002", "web listen address")
3737
outAddress = flag.String("out", ":10086", "out listen address(':10086' means use $localip:10086)")
3838
)
3939

@@ -58,7 +58,7 @@ func Init() bool {
5858
if len(*gWeb) > 0 {
5959

6060
go func() {
61-
e := http.ListenAndServe(fmt.Sprintf(":%s", *gWeb), nil)
61+
e := http.ListenAndServe(*gWeb, nil)
6262
if nil != e {
6363
panic(e)
6464
}

proto/build_proto.sh pb/build_proto.sh

+9
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,12 @@ if [ $(uname -s) = 'Linux' ]; then
2525
else
2626
PROTOC=$DIR/../../../tools/protoc_win/protoc.exe
2727
fi
28+
29+
if $PROTOC --go_out=. *.proto
30+
then
31+
echo build success
32+
sleep 1
33+
else
34+
echo build failed
35+
get_char
36+
fi

0 commit comments

Comments
 (0)