Skip to content

Commit 5b001a6

Browse files
authored
Merge pull request #141 from mackuba/binary_format
pass :binary_data_format option to driver
2 parents 54f752d + cedef4a commit 5b001a6

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

lib/faye/websocket/api.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ module API
2222
def initialize(options = {})
2323
@ready_state = CONNECTING
2424
super()
25-
::WebSocket::Driver.validate_options(options, [:headers, :extensions, :max_length, :ping, :proxy, :tls])
25+
::WebSocket::Driver.validate_options(options, [
26+
:headers, :extensions, :max_length, :ping, :proxy, :tls, :binary_data_format
27+
])
2628

2729
@driver = yield
2830

lib/faye/websocket/client.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ class Client
1414

1515
def initialize(url, protocols = nil, options = {})
1616
@url = url
17-
super(options) { ::WebSocket::Driver.client(self, :max_length => options[:max_length], :protocols => protocols) }
17+
super(options) {
18+
::WebSocket::Driver.client(self,
19+
:max_length => options[:max_length],
20+
:protocols => protocols,
21+
:binary_data_format => options[:binary_data_format]
22+
)
23+
}
1824

1925
proxy = options.fetch(:proxy, {})
2026
@endpoint = URI.parse(proxy[:origin] || @url)

0 commit comments

Comments
 (0)