func conv_addr(address *net.UDPAddr) (c_addr C.ENetAddress) { c_ip := C.CString(address.IP.String()) defer C.free(unsafe.Pointer(c_ip)) C.enet_address_set_host(&c_addr, c_ip) c_addr.port = C.enet_uint16(address.Port) return }
func (a *ENetAddress) SetPort(port uint) { a.port = C.enet_uint16(port) }