// enet_host_service func (host *Host) Service(timeout time.Duration) (*Event, error) { if timeout < 0 { return nil, errors.New("Timeout duration was negative") } var c_event C.ENetEvent ret := C.enet_host_service(host.host, &c_event, C.enet_uint32(timeout/time.Millisecond)) return host.ret_to_error(&c_event, ret) }
func (h *ENetHost) Service(event *ENetEvent, timeout int) int { return int(C.enet_host_service((*C.ENetHost)(h), (*C.ENetEvent)(event), C.enet_uint32(timeout))) }