From experience, any code that interacts with the outsdie world needs to be seperated out, as seperate objects. I'd suggest the decorator pattern.
For instance, if you were implementing a calculator, your object would have methods such as add(...), subtract(...), divide(...). Each of these methods would call a decorator class you fed in at some point. What if you wanted to work w/ them as BigInteger, or IEEE Floating point, or some other method for floating point?
The only difference from what I'm stating and your second example, is you wouldn't "use SendRcv;" w/i there. You'd do something like...
$server = Server->new( SendRcv->new() )
Or in two lines..
$server = Server->new();
$server->set_comm_i_cant_think_of_better_name( SendRcv->new() )
</code>