his / gwt-gae-channel

Automatically exported from code.google.com/p/gwt-gae-channel
0 stars 0 forks source link

Need a sample app for documentation/testing purposes #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I need to add a simple sample app that uses this package, partially to document 
the usage, and partially to have something to run to verify that changes made 
to fix bugs are actually fixing bugs and not causing more.

Original issue reported on code.google.com by jasonhall@google.com on 31 Jan 2011 at 7:18

GoogleCodeExporter commented 9 years ago
attached is a sample app that i was putting together.  There are a lot of 
things I would fix - make it a real MVP pattern, etc.  But it is a start.  If 
you like, I can make further modifications to clean up/change whatever you feel 
would be needed.

Original comment by Qagw...@gmail.com on 1 Mar 2011 at 4:00

Attachments:

GoogleCodeExporter commented 9 years ago
Would it be possible to illustrate how to close the channel too?

Original comment by sebastie...@gmail.com on 8 Jul 2011 at 8:29

GoogleCodeExporter commented 9 years ago
The Channel.open() method returns a Socket which you can close().

Socket socket = channel.open(new SocketListener() {
   @Override
   void onOpen() {
     socket.close(); // <----
   }
   @Override
   void onClose() {
     // do something after the socket has been closed
   }
});

Original comment by buchholz...@googlemail.com on 8 Jul 2011 at 10:50