sgowtham441 / pywebsocket

Automatically exported from code.google.com/p/pywebsocket
0 stars 0 forks source link

Ability to make the server websocket traffic first. in standalone.py #125

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently there is no way in standalone.py to have the 
server initiate traffic (after handshake done). It would be very useful to have 
that feature so that we can test server initiated traffic.

Original issue reported on code.google.com by vrnat...@gmail.com on 9 Nov 2012 at 2:29

GoogleCodeExporter commented 9 years ago
What do you actually mean by "server initiate traffic"?

You can send a message to client without waiting for any message from the 
client. For example, please try this handler:

  def web_socket_do_extra_handshake(request):
      pass

  def web_socket_transfer_data(request):
      request.ws_stream.send_message('I am a server')

Original comment by tyoshino@chromium.org on 25 Dec 2012 at 7:37