Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #12743

How to receive and send websocket messages in Java?

From Mihael <isaev.mihael@gmail.com>
Newsgroups comp.lang.java.programmer
Subject How to receive and send websocket messages in Java?
Date 2012-03-07 12:02 -0800
Organization http://groups.google.com
Message-ID <31969353.4397.1331150560621.JavaMail.geo-discussion-forums@vbtv42> (permalink)

Show all headers | View raw


Hello!

I try to create websocket server on Java

this is my draft of code http://pastebin.com/k1D46cV7

i try to connect from Chrome on Mac version 17.0.963.66
from this test page http://websocket.org/echo.html

And connection success

But when i send any data to server, in console on server application i see string like 

БУЭѓчЮ’ ЫттПДсюƒТкљ№Тмл Е

how can i decode this string to normal?

And when i try to send answer from server - client not get message...

Please, give me code for right receive and decode message and right encode and send message.

Big thanks :)

----

I found documentation http://tools.ietf.org/agenda/80/slides/hybi-2.pdf but can't understand.. 

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar


Thread

How to receive and send websocket messages in Java? Mihael <isaev.mihael@gmail.com> - 2012-03-07 12:02 -0800
  Re: How to receive and send websocket messages in Java? Mihael <isaev.mihael@gmail.com> - 2012-03-07 12:03 -0800
  Re: How to receive and send websocket messages in Java? Lew <lewbloch@gmail.com> - 2012-03-07 13:17 -0800
    Re: How to receive and send websocket messages in Java? Mihael <isaev.mihael@gmail.com> - 2012-03-07 14:08 -0800
      Re: How to receive and send websocket messages in Java? Knute Johnson <nospam@knutejohnson.com> - 2012-03-07 14:24 -0800

csiph-web