Android : How to implement SignalR server methods in Client without Hub

on Wednesday, September 3, 2014


im trying to set up an Android Application. Therefore i need to connect to a server which implemented SignalR. It seems that i can establish the Connection. The Server is not using Hubs. I know the signatures of the methods that shall be called in my client but i dont know how to implement them. When im looking at samples everyone establishes a Connection to a Hub and then subscribe to his proxy. Something like the following for example:



hub = connection.createHubProxy("myHub");
hub.subscribe(MainActivity.this);

hub.on("addChatMessage", new SubscriptionHandler() {

@Override
public void run() {
// TODO Auto-generated method stub
System.out.println("test");
}
});


So my question is how am i supposed to implement those methods that the server could call when i just have a connection to the server but not to a specific hub?


im very new to this and hopefully i could explain my problem well enough ;)


thanks in advance


0 comments:

Post a Comment