Add class for transparently calling functions over a socket