Hi i have been implementing SignalR Client server in Vb I can send the user inputs from server to client successfully in sequence but i'm unable to send the user input sequentially from client to server. i'm not sure why .continue is used and can we replace this .contuewith block using anyother lopp(while) i have very less knowledge in vb could anyone please help
Please find my Client code below:
Sub Main()
Dim connection = New HubConnection("http://localhost:8080")
Dim myHub = connection.CreateHubProxy("myHub")
connection.Start().Wait()
Console.ForegroundColor = ConsoleColor.Yellow
Dim input As String = Console.ReadLine()
myHub.Invoke(Of String)("chatter", input) _
.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