| 1 | use strict; | ||
| 2 | use warnings; | ||
| 3 | |||
| 4 | package POE::Component::Server::Postfix::TCP; | ||
| 5 | our $VERSION = '0.001'; | ||
| 6 | |||
| 7 | |||
| 8 | use MooseX::POE; | ||
| 9 | extends 'POE::Component::Server::Postfix'; | ||
| 10 | |||
| 11 | has port => (is => 'ro', isa => 'Int', required => 1); | ||
| 12 | has host => (is => 'ro', isa => 'Str', default => '0.0.0.0'); | ||
| 13 | |||
| 14 | |||
| 15 | sub socketfactory_args { | ||
| 16 | my ($self) = @_; | ||
| 17 | return ( | ||
| 18 | SocketDomain => Socket::AF_INET, | ||
| 19 | BindAddress => $self->host, | ||
| 20 | BindPort => $self->port, | ||
| 21 | ); | ||
| 22 | } | ||
| 23 | |||
| 24 | 1; | ||
| 25 | |||
| 26 | __END__ |