File tree Expand file tree Collapse file tree 4 files changed +281
-211
lines changed Expand file tree Collapse file tree 4 files changed +281
-211
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,9 @@ go_test(
3838 name = "go_default_test" ,
3939 srcs = [
4040 "group_intern_test.go" ,
41- "group_test.go" ,
4241 "tox_test.go" ,
4342 ],
43+ args = ["-test.parallel 50" ],
4444 embed = [":go_default_library" ],
4545 importpath = "github.com/TokTok/go-toxcore-c" ,
4646)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -955,6 +955,23 @@ func (this *Tox) SelfGetFriendList() []uint32 {
955955
956956// tox_callback_***
957957
958+ func (this * Tox ) SelfGetDhtId () string {
959+ var addr [PUBLIC_KEY_SIZE ]byte
960+ var caddr = (* C .uint8_t )(unsafe .Pointer (& addr [0 ]))
961+ C .tox_self_get_dht_id (this .toxcore , caddr )
962+
963+ return strings .ToUpper (hex .EncodeToString (addr [:]))
964+ }
965+
966+ func (this * Tox ) SelfGetUdpPort () (uint16 , error ) {
967+ var cerr C.TOX_ERR_GET_PORT
968+ r := C .tox_self_get_udp_port (this .toxcore , & cerr )
969+ if cerr > 0 {
970+ return 0 , toxerr (cerr )
971+ }
972+ return uint16 (r ), nil
973+ }
974+
958975func (this * Tox ) SelfGetNospam () uint32 {
959976 r := C .tox_self_get_nospam (this .toxcore )
960977 return uint32 (r )
You can’t perform that action at this time.
0 commit comments