Send the hostname as the first line
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
d767632eed
commit
678d005061
4
Makefile
4
Makefile
|
@ -3,9 +3,7 @@ DNSNAME = $(shell hostname -f)
|
|||
# check if DNSNAME is a FQDN
|
||||
|
||||
all:
|
||||
# 'gaper' is a simple and smart golang tool that just rebuilds every time you change a file
|
||||
# go get -u github.com/maxcnunes/gaper
|
||||
# gaper
|
||||
# make push
|
||||
|
||||
push:
|
||||
git pull
|
||||
|
|
|
@ -2,7 +2,13 @@ DNSNAME = $(shell hostname -f)
|
|||
|
||||
# check if DNSNAME is a FQDN
|
||||
|
||||
all:
|
||||
run:
|
||||
go run *.go
|
||||
|
||||
gaper:
|
||||
# 'gaper' is a simple and smart golang tool that just rebuilds every time you change a file
|
||||
# go get -u github.com/maxcnunes/gaper
|
||||
gaper
|
||||
|
||||
ipv6-delete:
|
||||
ip addr del 2600:1700:da80:8510::2c dev wifi0
|
||||
|
|
|
@ -6,7 +6,7 @@ import "bufio"
|
|||
import "os"
|
||||
|
||||
const (
|
||||
CONN_HOST = "localhost"
|
||||
CONN_HOST = "fire.lab.wit.com"
|
||||
CONN_PORT = "3333"
|
||||
CONN_PROTO = "tcp"
|
||||
)
|
||||
|
@ -17,9 +17,12 @@ func main() {
|
|||
// connect to this socket
|
||||
conn, _ := net.Dial(CONN_PROTO, CONN_HOST+":"+CONN_PORT)
|
||||
|
||||
// read in input from stdin
|
||||
reader := bufio.NewReader(os.Stdin)
|
||||
|
||||
fmt.Fprintf(conn,"librem15.lab.wit.com\n")
|
||||
|
||||
for {
|
||||
// read in input from stdin
|
||||
reader := bufio.NewReader(os.Stdin)
|
||||
fmt.Print("Text to send: ")
|
||||
text, _ := reader.ReadString('\n')
|
||||
// send to socket
|
||||
|
|
Loading…
Reference in New Issue