The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/aws-code/listen.go

26 lines
369 B

package main
import (
"fmt"
"io"
"net"
"time"
)
func listenMain() { // TODO: temp fix to unblock test
ln, err := net.Listen("tcp", "localhost:9000")
if err != nil {
panic(err)
}
defer ln.Close()
for {
conn, err := ln.Accept()
if err != nil {
panic(err)
}
io.WriteString(conn, fmt.Sprint("Hello World\n", time.Now(), "\n"))
conn.Close()
}
}