See RFC 6455 for information
# Parse the input handshake sent by the client
# See RFC 6455 for information
private fun parse_handshake: Map[String,String]
do
var recved = read_http_frame(new FlatBuffer)
var headers = recved.split("\r\n")
var headmap = new HashMap[String,String]
for i in headers do
var temp_head = i.split(" ")
var head = temp_head.shift
if head.is_empty or head.length == 1 then continue
if head.chars.last == ':' then
head = head.substring(0, head.length - 1)
end
var body = temp_head.join(" ")
headmap[head] = body
end
return headmap
end
lib/websocket/websocket.nit:109,2--127,4