Add using communication for server
This commit is contained in:
parent
4fba091d4d
commit
b33d5f036c
|
@ -8,6 +8,7 @@ import (
|
|||
"log"
|
||||
"net"
|
||||
|
||||
"git.qowevisa.me/Qowevisa/gotell/communication"
|
||||
"git.qowevisa.me/Qowevisa/gotell/env"
|
||||
)
|
||||
|
||||
|
@ -52,6 +53,12 @@ func main() {
|
|||
func handleClient(conn net.Conn) {
|
||||
defer conn.Close()
|
||||
buf := make([]byte, 512)
|
||||
ask, err := communication.AskClientNickname()
|
||||
if err != nil {
|
||||
log.Printf("ERROR: %#v\n", err)
|
||||
} else {
|
||||
conn.Write(ask)
|
||||
}
|
||||
for {
|
||||
log.Print("server: conn: waiting")
|
||||
n, err := conn.Read(buf)
|
||||
|
|
Loading…
Reference in New Issue
Block a user