Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removing old code.

  • Loading branch information...
commit 4e2b56e05fecec5979f22ae7ff7ac2a842fd3a2e 1 parent a3f25ec
@gimite authored
Showing with 2 additions and 22 deletions.
  1. +1 −21 lib/web_socket.rb
  2. +1 −1  samples/chat_server.rb
View
22 lib/web_socket.rb
@@ -124,26 +124,6 @@ def receive()
raise(WebSocket::Error, "input must start with \\x00 and end with \\xff")
end
return $1.force_encoding("UTF-8")
-=begin
- begin
- while @received.empty?
- new_data = @socket.readpartial(10240)
- if new_data =~ /\A(.*)\xff(.*)\z/n
- @buffer << $1
- next_buf = $2
- if !(@buffer =~ /\A\x00(.*)\z/n)
- raise(WebSocket::Error, "input must start with \\x00")
- end
- @received.push($1.force_encoding("UTF-8"))
- @buffer = next_buf
- else
- @buffer << new_data
- end
- end
- rescue EOFError
- end
- return @received.shift()
-=end
end
def tcp_socket
@@ -243,7 +223,7 @@ def print_backtrace(ex)
when "server"
server = WebSocketServer.new(
- ARGV[1] || "ws://localhost:19006",
+ ARGV[1] || "ws://localhost:10081",
:host => "0.0.0.0")
puts("Ready")
server.run() do |ws|
View
2  samples/chat_server.rb
@@ -4,7 +4,7 @@
Thread.abort_on_exception = true
server = WebSocketServer.new(
- ARGV[0] || "ws://localhost:19006",
+ ARGV[0] || "ws://localhost:10081",
:host => "0.0.0.0")
puts("Ready")
connections = []
Please sign in to comment.
Something went wrong with that request. Please try again.