Skip Menu |

This queue is for tickets about the Net-Async-WebSocket CPAN distribution.

Report information
The Basics
Id: 85104
Status: open
Priority: 0/
Queue: Net-Async-WebSocket

People
Owner: Nobody in particular
Requestors: topazstorm [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Missing handler for close frames
Date: Tue, 7 May 2013 01:33:05 -0400
To: bug-Net-Async-WebSocket [...] rt.cpan.org
From: Topaz <topazstorm [...] gmail.com>
In Net::Async::WebSocket::Protocol::on_read, it seems like frames which indicate the end of WebSocket session are not handled; in my testing, the connections eventually time out, but I'd like to be able to respond to them immediately. The correct thing to do is probably to fabricate the appropriate response packet indicating that the socket is being shut down. However, in my testing, merely adding this code after the $framebuffer->next loop and before the return was sufficient: $self->close() if $framebuffer->is_close; I leave discerning the correct behavior according to the WebSocket spec to someone more familiar with it. Using: Net-Async-WebSocket-0.06 This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi Linux 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Version 0.12 adds a ->send_close_frame method and on_close_frame event. Will that be sufficient to solve this? -- Paul Evans
On Fri Dec 08 20:25:18 2017, PEVANS wrote: Show quoted text
> Version 0.12 adds a ->send_close_frame method and on_close_frame > event. Will that be sufficient to solve this?
Assuming that it triggers immediately upon a close event, and that the socket itself is also closed, probably.