-
October 11th, 2016, 01:57 AM
#1
Need help in signalr client
Hi I have been developing SignalR in VB i can send user inputs from SignalRsever to SignalRClient but i'm unable to send the values in sequence from Client to server th issue i'm facing here is : i'm unable to send not more than 2 values the window exits Could anyone please help. Below is the code SignalRClient:
Sub Main()
Dim connection = New HubConnection("http://localhost:8080")
Dim myHub = connection.CreateHubProxy("myHub")
connection.Start().Wait()
Console.ForegroundColor = ConsoleColor.Yellow
myHub.Invoke(Of String)("Chatter", Console.ReadLine) _
.ContinueWith(
Sub(task)
If task.IsFaulted Then
Console.WriteLine("Could not Invoke the server method Chatter: {0}", _
task.Exception.GetBaseException())
Else
Console.WriteLine("Success calling chatter method")
End If
End Sub)
myHub.On(Of String)("addMessage", _
Sub(param)
Console.WriteLine("Client receiving value from server: {0}", param.ToString())
End Sub)
Console.ReadLine()
End Sub
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|