uperl / AnyEvent-WebSocket-Client

WebSocket client for AnyEvent
9 stars 10 forks source link

override host and port with positional arguments #45

Closed plicease closed 5 years ago

plicease commented 5 years ago

This PR allows the caller to specify host/port name overrides that are different from the URI. It uses positional arguments that are passed directly in as-is (if defined) to tcp_connect, which also allows the caller to specify a unix domain socket in the usual way that you do for tcp_connect.

akalinux commented 5 years ago

So is this in place of the patch I suggested?

plicease commented 5 years ago

That is my intent yes.

plicease commented 5 years ago

I've decided to go ahead and merge this version. As I mentioned, I prefer the positional arguments in this case and to delegate the responsibility for understanding them to AnyEvent, mostly for maintenance reasons, but I also think that this interface should be immediately familiar to AnyEvent programmers who have done socket programming. I appreciate this isn't exactly the interface that you wanted, but I hope that it allows you to do what you need to do. I am releasing this as 0.51_01 to cpan right now, and should hopefully be able to do a production release in a week or or so assuming no issues pop up.