Exemplo n.º 1
0
Arquivo: bridge.go Projeto: vmware/vic
// MessageSend sends a request through a MessageChannel
func MessageSend(c MessageChannel, request []byte) bool {
	n := len(request)
	var buffer *C.uchar
	if n > 0 {
		buffer = (*C.uchar)(unsafe.Pointer(&request[0]))
	}
	status := C.Message_Send(c, buffer, C.size_t(n))
	return status != 0
}
Exemplo n.º 2
0
// MessageSend sends a request through a MessageChannel
func MessageSend(c MessageChannel, request []byte) bool {
	buffer := (*C.uchar)(unsafe.Pointer(&request[0]))
	status := C.Message_Send(c, buffer, (C.size_t)(C.int(len(request))))
	return status != 0
}