Example #1
0
 def on_message(self, message):
     console.log('RECV: '.format(message.data))
     msg = UI.Card(title='RECV', body=message.data)
     msg.show()
Example #2
0
 def send(self, message):
     console.log('SEND: '.format(message))
     self.socket.send(message)
Example #3
0
 def on_close(self, event):
     self.connected = False
     console.log('Disconnected')
Example #4
0
 def on_open(self, event):
     self.connected = True
     console.log('Connected')
     self.send('Hello Websockets!')
Example #5
0
 def on_error(self, error):
     self.connected = False
     console.log('Failed to connect.')
     console.log('Error: \n{}'.format(error))
Example #6
0
def test_console():
    console.log('Hello from Console Test, let us begin.')