사람들이 질문을 게시하고 다른 사람들이 대답을 게시하는 포럼이 있다고 가정합니다. 예를 들어 사람을 말하십시오. 질문을 게시하십시오. "신호는 무엇입니까?" 그 페이지에 서십시오. 다른 사람도 응답을 위해 해당 페이지를 엽니 다. 다른 사람이 답변을 올리면 다른 사용자가 열어 본 페이지에 답변이 표시되기를 원합니다. 5 명의 사용자가 그 페이지를 열고 그 중 하나가 대답하면 5 명의 사용자가 그 대답을 볼 것입니다.신호기를 사용하여 특정 페이지로의 광범위한 캐스트 메시지
일반적으로 우리가 다음 우리는 서버 측
Clients.All.broadcastMessage(name, message);
에서 같은 구문을 사용 그래서 내가 사용해야하는 구문의 종류를 내 위의 상황에 따라 모두에게 어떤 메시지를 방송하고자 할 때? 여기
내가 광범위한 캐스트 메시지 유형에 대한 발견 몇 가지 안내하고 사람들은 내가 사용할 필요가// Call send on everyone
Clients.All.send(message);
// Call send on everyone except the caller
Clients.Others.send(message);
// Call send on everyone except the specified connection ids
Clients.AllExcept(Context.ConnectionId).send(message);
// Call send on the caller
Clients.Caller.send(message);
// Call send on everyone in group "foo"
Clients.Group("foo").send(message);
// Call send on everyone else but the caller in group "foo"
Clients.OthersInGroup("foo").send(message);
// Call send on everyone in "foo" excluding the specified connection ids
Clients.Group("foo", Context.ConnectionId).send(message);
// Call send on to a specific connection
Clients.Client(Context.ConnectionId).send(message);
어느 다음입니까? 덕분에 &을 설명하십시오.