| | |
| | | |
| | | } |
| | | |
| | | func ServerCallbackReply(tag unsafe.Pointer, rep *bh.MsgRequestTopicReply) bool { |
| | | data, _ := rep.Marshal() |
| | | return C.BHServerCallbackReply(tag, unsafe.Pointer(&data[0]), C.int(len(data))) > 0 |
| | | } |
| | | |
| | | type ServecCB func(proc_id *string, req *bh.MsgRequestTopic, reply *bh.MsgRequestTopicReply) bool |
| | | type ServecCB func(src unsafe.Pointer, proc_id *string, req *bh.MsgRequestTopic) |
| | | type SubDataCB func(proc_id *string, pub *bh.MsgPublish) |
| | | type ClientCB func(proc_id *string, msg_id *[]byte, reply *bh.MsgRequestTopicReply) |
| | | |
| | | func cserver_callback(cpid *unsafe.Pointer, cpid_len unsafe.Pointer) { |
| | | func cserver_callback(cpid unsafe.Pointer, pid_len C.int, src unsafe.Pointer) { |
| | | |
| | | } |
| | | func StartWorker(server_cb ServecCB, sub_cb SubDataCB, client_cb ClientCB) { |