Created
December 5, 2016 20:55
-
-
Save fuzzy/814880b198d229a1a686cd8eb1f3bb90 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net" | |
"time" | |
) | |
func main() { | |
ts := time.Now().Unix() | |
for { | |
conn, _ := net.Dial("tcp", "relay-vip.phl.corp.theplatform.com:2003") | |
text := fmt.Sprintf("10s.phl.fuzzy.go-client 1 %d\n", ts) | |
// send to socket | |
fmt.Fprintf(conn, text) | |
fmt.Printf("%s", text) | |
time.Sleep(2 * time.Second) | |
ts -= 10 | |
conn.Close() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment