# DRb callback when objects are unmarshalled, on the client?

**URL:** <https://www.ruby-forum.com/t/drb-callback-when-objects-are-unmarshalled-on-the-client/74640>\
**Category:** Ruby\
**Created:** [November 7, 2006, 10:51am UTC](https://www.ruby-forum.com/t/drb-callback-when-objects-are-unmarshalled-on-the-client/74640 "2006-11-07T10:51:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![philpraxis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/77aa72/32.png) [@philpraxis](https://www.ruby-forum.com/u/philpraxis)\
**Post date:** [November 7, 2006, 10:51am UTC](https://www.ruby-forum.com/t/drb-callback-when-objects-are-unmarshalled-on-the-client/74640/1 "2006-11-07T10:51:14Z")

</div>

Hi,

We are trying to figure out where to “hook” in DRb in order to be  
notified when an object has just been unmarshalled, on the client. Does  
anybody have an idea?

The goal is to add local functions dynamically, as soon as the object  
appears on the client, transparently, based on the data that was  
transferred.

Thanks!

---

<div class="post-metadata">

**Author:** ![philpraxis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/77aa72/32.png) [@philpraxis](https://www.ruby-forum.com/u/philpraxis)\
**Post date:** [November 7, 2006, 10:51am UTC](https://www.ruby-forum.com/t/drb-callback-when-objects-are-unmarshalled-on-the-client/74640/2 "2006-11-07T10:51:19Z")

</div>

(this is theorical knowledge based on what I read in the drb source  
code)

I think that you would have to add a new DRbProtocol (see documentation  
for  
that class) and add mechanisms to do what you want in #recv\_reply
