Exemplo n.º 1
0
Arquivo: addr.go Projeto: zchee/gouv
func Ip6Addr(host string, port uint16) (SockaddrIn, error) {
	phost := C.CString(host)
	defer C.free(unsafe.Pointer(phost))
	var addr C.struct_sockaddr_in6
	addr = C.uv_ip6_addr(phost, C.int(port))
	return &SockaddrIn6{addr}, nil
}
Exemplo n.º 2
0
func Ip6Addr(host string, port uint16) SockaddrIn {
	phost := C.CString(host)
	defer C.free(unsafe.Pointer(phost))
	return &SockaddrIn6{C.uv_ip6_addr(phost, C.int(port))}
}