This commit is contained in:
poiuty 2023-05-11 00:43:02 +03:00
parent 9fe159f6f3
commit 12e5ac6f68
5 changed files with 242 additions and 0 deletions

31
client/client.go Normal file
View file

@ -0,0 +1,31 @@
package main
import (
"net"
"time"
)
var echoSocket = make(chan []byte)
func startSocket() {
for {
select {
case b := <-echoSocket:
conn, err := net.Dial("unix", "/tmp/echo.sock")
if err == nil {
conn.Write(b)
conn.Close()
}
}
}
}
func main() {
go startSocket()
for {
echoSocket <- []byte(`{"chanel":"stripchat","room":"naughtyobsessions","donator":"tbone6893","amount":333}`)
echoSocket <- []byte(`{"chanel":"stripchat","index":28}`)
time.Sleep(1e9)
}
}