Beispiel #1
0
/* Sends message to somebody */
func (client *Client) SendMessage(jid string, message string) {
	jid_i := C.CString(jid)
	msg_type := C.CString("chat")
	message_i := C.CString(message)
	C.send_message(client.ConnInfo.conn, client.ConnInfo.ctx,
		msg_type, jid_i, message_i)
}
Beispiel #2
0
func main() {
	fmt.Printf("Hello World\n")
	cstr := C.CString("Hello World from C!")
	C.send_message(cstr)
	C.free(unsafe.Pointer(cstr))
}