Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
explicitly set encoding on sockets
  • Loading branch information
moritz committed Jun 27, 2012
1 parent 88a9d69 commit d0dc2d3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/IO/Socket/INET.pm
Expand Up @@ -16,6 +16,7 @@ my class IO::Socket::INET does IO::Socket {
constant PROTO_UDP = 17;
}

has Str $.encoding = 'utf8';
has Str $.host;
has Int $.port = 80;
has Str $.localhost;
Expand Down Expand Up @@ -76,6 +77,7 @@ my class IO::Socket::INET does IO::Socket {
$PIO.bind($addr);
}

$PIO.encoding(nqp::unbox_s(PARROT_ENCODING(self.encoding)));
if $.listen {
$PIO.listen($.listen);
}
Expand Down

0 comments on commit d0dc2d3

Please sign in to comment.