android - Can't get AutoBahn Websocket to Connect -


i trying of websocket client libraries developed android usage. fiddling autobahn library , can't seem "example" client connect server. using following code:

          try {          mconnection.connect(wsuri, new websockethandler() {              @override             public void onopen() {                log.d(tag, "status: connected " + wsuri);                 mconnection.sendtextmessage("info");             }             @override             public void ontextmessage(string payload) {                log.d(tag, "got echo: " + payload);             }             @override             public void onclose(int code, string reason) {                log.d(tag, "connection lost.");             }          });       } catch (websocketexception e) {           log.d(tag, e.tostring());       } 

i sniff using wireshark , can see tcp connection established, can see http go out. but, server isn't responding upgrade message. notice autobahn connect message (in http header) doesn't contain origin field reason. tried different library did connect, , had origin field in http get. know issue, or not supported auotbahn ?

web browser fill origin field , disallow javascript manipulating origin. non-browser websocket clients, client can set origin likes. hence origin cannot trusted websocket server.

the presence of origin not required websocket spec, , setting not supported autobahnandroid.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -