File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -136,10 +136,24 @@ def unpack_exception(unpacker)
136136 return exception
137137 end
138138
139+ # Pack a reference type object (e.g., Controller) into a MessagePack packer.
140+ #
141+ # Serializes the object as a proxy by generating a temporary name and writing it to the packer.
142+ # The object is implicitly bound to the connection with a temporary name.
143+ #
144+ # @parameter object [Object] The reference type object to serialize.
145+ # @parameter packer [MessagePack::Packer] The packer to write to.
139146 def pack_reference ( object , packer )
140147 packer . write ( @connection . proxy_name ( object ) )
141148 end
142149
150+ # Unpack a reference type object from a MessagePack unpacker.
151+ #
152+ # Reads a proxy name and returns the corresponding object or proxy.
153+ # If the object is bound locally, returns the actual object; otherwise returns a proxy.
154+ #
155+ # @parameter unpacker [MessagePack::Unpacker] The unpacker to read from.
156+ # @returns [Object | Proxy] The actual object if bound locally, or a proxy otherwise.
143157 def unpack_reference ( unpacker )
144158 @connection . proxy_object ( unpacker . read )
145159 end
You can’t perform that action at this time.
0 commit comments