Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

explicitly set encoding on sockets

  • Loading branch information...
commit d0dc2d33d0a5eabc1a781b52c253d1f1d85d0a61 1 parent 88a9d69
@moritz moritz authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  src/core/IO/Socket/INET.pm
View
2  src/core/IO/Socket/INET.pm
@@ -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;
@@ -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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.