*
* @param peer Peer to destroy
*
- * @return Zero on success, negatove error code on error.
+ * @note The memory allocated by @a deserialize_addr (if any)
+ * is deallocated by FORB and should not be deallocated here.
*/
- int (*peer_destroy)(forb_peer_t *peer);
+ void (*peer_destroy)(forb_peer_t *peer);
/**
* Receives data through a port
*
/** Serializes the protocol specific address */
CORBA_boolean (*serialize_addr)(FORB_CDR_Codec *codec, const void *addr);
- /** Deserializes the protocol specific address */
+ /** Deserializes the protocol specific address. The memory for
+ * storing the address should be allocated by forb_malloc(). */
CORBA_boolean (*deserialize_addr)(FORB_CDR_Codec *codec, void **addr);
+
+ /** Converts protocol specific address to string */
+ size_t (*addr2str)(char *dest, size_t maxlen, const void *addr);
+
+ /**
+ * Callback caled when the port is registered to FORB just
+ * before reception and discovery threads are started.
+ */
+ void (*register_cb)(forb_port_t *port);
};
size_t forb_proto_send(forb_peer_t *peer, FORB_CDR_Codec *codec);