/// <summary> /// 发送消息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button3_Click(object sender, EventArgs e) { string m = textBox1.Text; string id = connection.ConnectionId; //调用 hub中的方法 Send rhub.Invoke("Send", id, m).Wait(); }
private void btnSend_Click(object sender, RoutedEventArgs e) { rhub.Invoke("ReceiveMessage", "6666").Wait(); }