大家好,我只是在测试信号器,我玩得很开心,离我通常的技能有点远,现在我的问题是我可以将一个列表传递给客户这是我的代码
Public Sub Send(message As String, id As String)
Dim tomessage = OnlineUser.userObj.Where(Function(users) users.userId = id).[Select](Function(users) users.connectionId).SingleOrDefault()
Dim customers As New List(Of locationslist)
customers.Add(New locationslist)
customers((customers.Count - 1)).CITE_NR = message
customers((customers.Count - 1)).LATITUDE = "114.20"
customers((customers.Count - 1)).LONGITUDE = "115.20"
customers((customers.Count - 1)).DATECOMTD = "01/01/2011"
customers((customers.Count - 1)).CLASSOFF = "MURDER"
customers((customers.Count - 1)).TIME = "01:20"
customers((customers.Count - 1)).CASESTAT = "GSLVGED"
Clients.Client(tomessage).receiveMessage(customers)
End Sub
在客户端我正在这样做
usr.client.receiveMessage = function (message) {
alert("Received from server: " + message.CITE_NR);
};
但不幸的是,消息说从服务器收到:未定义
这甚至可能吗谢谢你的帮助