Work in Progress
Using Gradle 2.2.1 or later:
gradle buildimport org.phoenixframework.channels.*
def socket = new Socket('ws://localhost:4000/ws')
socket.connect()
def chan = socket.chan()
chan.join("rooms:lobby", null)
.receive("ignore", { -> println "IGNORE"})
.receive("ok", { envelope -> println "JOINED with $envelope" })
chan.on('message_feed', { envelope -> println "MESSAGE FEED: $envelope"})
.on('ping', { -> println "PING" })
.on('new_msg', { -> println "NEW MESSAGE: $envelope"})
- The following will run the Groovy test client application for Chris McCord's Phoenix Takes Flight - Chat application
- See SimpleCliTest.groovy for the sample client source
gradle runGroovyTest