arns-lt-gemini/text_server.go
Arnas Udovicius f9267b02d0
All checks were successful
continuous-integration/drone/push Build is passing
testing conn
2022-08-18 01:39:38 +03:00

19 lines
329 B
Go

package main
import (
"bufio"
"fmt"
"net"
)
func GetSummery() string {
panic(fileSrvHost + ":" + fileSrvPort)
conn, err := net.Dial("tcp", fileSrvHost+":"+fileSrvPort)
if err != nil {
panic(err.Error())
}
fmt.Fprintf(conn, "\n")
message, err := bufio.NewReader(conn).ReadString('\n')
conn.Close()
return message
}