Example #1
0
File: bridge.go Project: 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
}
Example #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
}