You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.
I have written the following client code for a simple echo server. But it doesnt work as expected. Please let me know the problem in this code.
use strict;
use warnings;
use Protocol::WebSocket::Client;
use IO::Socket::INET;
use Data::Dumper;
my $socket = new IO::Socket::INET (
PeerHost => '192.168.56.101',
PeerPort => '8082',
Proto => 'tcp',
Blocking => 0,
) or die "No connection\n";
my $client = Protocol::WebSocket::Client->new(url => 'ws://192.168.56.101:8082');
$client->on(
write => sub {
my $client = shift;
my ($buf) = @;
print @;
syswrite $socket, $buf;
}
);
$client->connect;
$client->write('echo');
$client->disconnect;
The text was updated successfully, but these errors were encountered: