In addition to
POE, I'd look at a connection using HTTP as a protocol. Why? Because
HTTP::Daemon makes it easy to write a server,
LWP::UserAgent makes it easy to write a client, and you get both binary-safe data and binary-safe meta-data (form posting) in both directions.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.