@@ -80,8 +80,8 @@ func (h C.uintptr_t) HostClose() {
80
80
handle .Value ().(host.Host ).Close ()
81
81
}
82
82
83
- //export SetStreamHandler
84
- func (h C.uintptr_t ) SetStreamHandler (protoId string , procId C.erl_pid_t , callback C.send_message_t ) {
83
+ //export HostSetStreamHandler
84
+ func (h C.uintptr_t ) HostSetStreamHandler (protoId string , procId C.erl_pid_t , callback C.send_message_t ) {
85
85
handle := cgo .Handle (h )
86
86
host := handle .Value ().(host.Host )
87
87
// WARN: we clone the string because the underlying buffer is owned by Elixir
@@ -92,8 +92,8 @@ func (h C.uintptr_t) SetStreamHandler(protoId string, procId C.erl_pid_t, callba
92
92
host .SetStreamHandler (protocol .ID (goProtoId ), handler )
93
93
}
94
94
95
- //export NewStream
96
- func (h C.uintptr_t ) NewStream (pid C.uintptr_t , protoId string ) C.uintptr_t {
95
+ //export HostNewStream
96
+ func (h C.uintptr_t ) HostNewStream (pid C.uintptr_t , protoId string ) C.uintptr_t {
97
97
host := cgo .Handle (h ).Value ().(host.Host )
98
98
peerId := cgo .Handle (pid ).Value ().(peer.ID )
99
99
// WARN: we clone the string because the underlying buffer is owned by Elixir
@@ -127,8 +127,8 @@ func (h C.uintptr_t) HostAddrs() C.uintptr_t {
127
127
/* Peerstore methods */
128
128
/*********************/
129
129
130
- //export AddAddrs
131
- func (ps C.uintptr_t ) AddAddrs (id , addrs C.uintptr_t , ttl uint64 ) {
130
+ //export PeerstoreAddAddrs
131
+ func (ps C.uintptr_t ) PeerstoreAddAddrs (id , addrs C.uintptr_t , ttl uint64 ) {
132
132
psv := cgo .Handle (ps ).Value ().(peerstore.Peerstore )
133
133
idv := cgo .Handle (id ).Value ().(peer.ID )
134
134
addrsv := cgo .Handle (addrs ).Value ().([]multiaddr.Multiaddr )
0 commit comments