Skip to content

nicrioux/JavaPhoenixChannels

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phoenix Channel Client for Java and Android

Work in Progress

Building

Using Gradle 2.2.1 or later:

gradle build

Example Groovy Client

import 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"})

Running the Sample Client

gradle runGroovyTest

About

Java and Android channel client for the Phoenix Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 84.8%
  • JavaScript 7.7%
  • Groovy 7.5%