diff --git a/.gitignore b/.gitignore index 8741457..92e4eb3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -./cmd/proxy -./cmd/config.json -./main.go \ No newline at end of file +cmd/proxy +cmd/config.json +.main.go \ No newline at end of file diff --git a/cmd/config.json b/cmd/config.json deleted file mode 100644 index a4494ff..0000000 --- a/cmd/config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "coin": "alph", - "zmqAddr": "amqp://guest:guest@localhost:5672/", - "tcpAddr": "0.0.0.0:39002", - "proxyAddr": "alph.m2pool.com:33390" -} diff --git a/cmd/proxy b/cmd/proxy deleted file mode 100644 index b10444f..0000000 Binary files a/cmd/proxy and /dev/null differ diff --git a/main.go b/main.go deleted file mode 100644 index 961413c..0000000 --- a/main.go +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "log" - "time" - - "github.com/zeromq/goczmq" -) - -func main() { - // 绑定到指定地址(可以是本地或远程 IP) - endpoint := "tcp://0.0.0.0:5555" // 本机所有 IP 可访问 - sock, err := goczmq.NewPush(endpoint) - if err != nil { - log.Fatalf("Failed to create PUSH socket: %v", err) - } - defer sock.Destroy() - - fmt.Println("PUSH socket bound to", endpoint) - - // 定时发送消息 - for i := 0; i < 1000; i++ { - msg := fmt.Sprintf("Hello %d", i) - err := sock.SendFrame([]byte(msg), goczmq.FlagNone) - if err != nil { - log.Printf("Send error: %v", err) - } else { - fmt.Println("Sent:", msg) - } - time.Sleep(1 * time.Second) - } -}