update working
This commit is contained in:
12
utils.go
12
utils.go
@@ -1,7 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
"os/signal"
|
||||
"strconv"
|
||||
@@ -56,3 +58,13 @@ func CheckSignal(TCPClient *TCPClient, TCPServer *TCPServer, FlexClient *FlexCli
|
||||
os.Exit(0)
|
||||
}
|
||||
}
|
||||
|
||||
func SendUDPMessage(message string) {
|
||||
conn, err := net.Dial("udp", "127.0.0.1:2241")
|
||||
if err != nil {
|
||||
fmt.Printf("Some error %v", err)
|
||||
return
|
||||
}
|
||||
conn.Write([]byte(message))
|
||||
conn.Close()
|
||||
}
|
||||
|
Reference in New Issue
Block a user