mirror of
https://github.com/statbate/supreme-disco.git
synced 2026-08-11 03:22:41 +00:00
update
This commit is contained in:
parent
9fe159f6f3
commit
12e5ac6f68
5 changed files with 242 additions and 0 deletions
31
client/client.go
Normal file
31
client/client.go
Normal 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)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue