mirror of
https://gitee.com/johng/gf
synced 2026-07-05 13:22:16 +08:00
18 lines
306 B
Go
18 lines
306 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/gogf/gf/net/gtcp"
|
|
)
|
|
|
|
func main() {
|
|
dstConn, err := gtcp.NewPoolConn("www.medlinker.com:80")
|
|
_, err = dstConn.Write([]byte("HEAD / HTTP/1.1\n\n"))
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "ERROR: %s\n", err.Error())
|
|
}
|
|
fmt.Println(dstConn.RecvLine())
|
|
}
|