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?

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From Mihael <isaev.mihael@gmail.com>
Newsgroups comp.lang.java.programmer
Subject How to receive and send websocket messages in Java?
Date Wed, 7 Mar 2012 12:02:40 -0800 (PST)
Organization http://groups.google.com
Lines 31
Message-ID <31969353.4397.1331150560621.JavaMail.geo-discussion-forums@vbtv42> (permalink)
NNTP-Posting-Host 213.178.56.210
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-Trace posting.google.com 1331150561 22816 127.0.0.1 (7 Mar 2012 20:02:41 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Wed, 7 Mar 2012 20:02:41 +0000 (UTC)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=213.178.56.210; posting-account=XkQszAoAAAAy-h0PVVA5k3KyEmsulMn4
User-Agent G2/1.0
X-Received-Bytes 1810
Xref csiph.com comp.lang.java.programmer:12743

Show key headers only | 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