예제 #1
0
파일: xmpp.go 프로젝트: ildus/jabber_bot
/* 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)
}
예제 #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))
}