娃娃机屏蔽无用代码

This commit is contained in:
by 2024-09-21 10:37:14 +08:00
parent 193c7fc3d3
commit 254af4e5fb
1 changed files with 4 additions and 5 deletions

View File

@ -7,7 +7,6 @@ import (
"os" "os"
"os/signal" "os/signal"
"path/filepath" "path/filepath"
"syscall"
"time" "time"
"mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/logger"
@ -165,7 +164,7 @@ func init() {
module.RegisteModule(MachineMgr, time.Second, 0) module.RegisteModule(MachineMgr, time.Second, 0)
} }
func listenKeyboardEvents(conn net.Conn) { /*func listenKeyboardEvents(conn net.Conn) {
for { for {
// 读取键盘事件 // 读取键盘事件
key := readKeyboardEvent() key := readKeyboardEvent()
@ -242,9 +241,9 @@ func listenKeyboardEvents(conn net.Conn) {
queryBaseParam(conn) queryBaseParam(conn)
} }
} }
} }*/
func readKeyboardEvent() string { /*func readKeyboardEvent() string {
var b [1]byte var b [1]byte
var done uint32 var done uint32
err := syscall.ReadFile(syscall.Stdin, b[:], &done, nil) err := syscall.ReadFile(syscall.Stdin, b[:], &done, nil)
@ -253,7 +252,7 @@ func readKeyboardEvent() string {
} }
return string(b[:]) return string(b[:])
} }*/
func waitForUserExit() { func waitForUserExit() {
// 创建一个信号通道 // 创建一个信号通道