Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use single space as separator so client implementation is simpler in …
…languages without native regex support
  • Loading branch information
ninjudd committed May 12, 2011
1 parent 61fb916 commit b16c1a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/clj/portal/core.clj
Expand Up @@ -16,7 +16,7 @@
(recur (conj forms form)))))))

(defn decode-message [string]
(split (str string) #"\s+" 3))
(split (str string) #" " 3))

(defn encode-message [id type data]
(str id " " type " "
Expand Down
2 changes: 1 addition & 1 deletion src/rb/portal.rb
Expand Up @@ -38,7 +38,7 @@ def receive_message
raise ProtocolError.new("Message size must be an integer, found #{c.chr}") unless (?0..?9).include?(c)
size << c
end
message = @socket.read(size.to_i).split(/\s+/, 3)
message = @socket.read(size.to_i).split(/ /, 3)
raise ProtocolError.new("Message must be followed by comma") unless @socket.getc == ?,
message
end
Expand Down

0 comments on commit b16c1a8

Please sign in to comment.