summaryrefslogtreecommitdiffstats
path: root/lib/App/Termcast.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/App/Termcast.pm')
-rw-r--r--lib/App/Termcast.pm20
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/App/Termcast.pm b/lib/App/Termcast.pm
index c0804df..5a06b5a 100644
--- a/lib/App/Termcast.pm
+++ b/lib/App/Termcast.pm
@@ -118,6 +118,13 @@ has _got_winch => (
init_arg => undef,
);
+=method establishment_message
+
+Returns the string sent to the termcast server when connecting (typically
+containing the username and password)
+
+=cut
+
has establishment_message => (
traits => ['NoGetopt'],
is => 'ro',
@@ -134,6 +141,13 @@ sub _termsize {
return try { GetTerminalSize() } catch { (undef, undef) };
}
+=method termsize_message
+
+Returns the string sent to the termcast server whenever the terminal size
+changes.
+
+=cut
+
sub termsize_message {
my $self = shift;
@@ -212,7 +226,7 @@ before clear_socket => sub {
ReadMode 0 if $self->_raw_mode;
};
-sub new_socket {
+sub _new_socket {
my $self = shift;
$self->clear_socket;
$self->socket;
@@ -365,7 +379,7 @@ sub run {
}
if ($self->_socket_ready($eout)) {
- $self->new_socket;
+ $self->_new_socket;
}
if ($self->_in_ready($rout)) {
@@ -398,7 +412,7 @@ sub run {
$self->socket->recv($buf, 4096);
if (!defined $buf || length $buf == 0) {
if (defined $buf) {
- $self->new_socket;
+ $self->_new_socket;
}
else {
Carp::croak("Error reading from socket: $!");