On Thu, Jul 08, 2004 at 05:07:01PM -0700, Lamb Joseph wrote:
> Hello,
> 
> I am using the POE::Component::Client::TCP to connect
> to a server. The server wants messages sent as NULL
> terminated strings. Is there a filter already
> available? Are there better ways to send this server
> the following string?
> 
> qq(0,"2"1,"123423"10,"197448300"16,"OH"17,"44907"21,"5"22,"1"498,"4147"99,""\0);

You can use either POE::Filter::Stream and append the chr(0) yourself,
or you can use POE::Filter::Line with the (Literal => "\0") parameter.

  POE::Component::Client::TCP->new(
    ...,
    Filter => [ "POE::Filter::Line", "Literal", "\0" ],
    ...,
  );

should do it.

-- 
Rocco Caputo - http://poe.perl.org/

Reply via email to