我正在尝试连接到我的Xcode Server的内部socket.io。我用这个初始化客户端:
self.socket.connect()
但是当我使用2016-07-15 16:13:49.179 MyApp[84260:1941316] LOG SocketIOClient: Adding handler for event: connect
2016-07-15 16:13:49.180 MyApp[84260:1941316] LOG SocketIOClient: Adding handler for event: integrationStatus
2016-07-15 16:13:49.180 MyApp[84260:1941316] LOG SocketIOClient: Adding handler for event: advisoryIntegrationStatus
2016-07-15 16:13:49.180 MyApp[84260:1941316] LOG SocketIOClient: Adding engine
2016-07-15 16:13:49.181 MyApp[84260:1941316] LOG SocketEngine: Starting engine. Server: https://37.203.216.82
2016-07-15 16:13:49.181 MyApp[84260:1941316] LOG SocketEngine: Handshaking
2016-07-15 16:13:49.182 MyApp[84260:1941792] LOG SocketEnginePolling: Doing polling request
2016-07-15 16:13:49.317 MyApp[84260:1941792] LOG SocketEnginePolling: Got polling response
2016-07-15 16:13:49.322 MyApp[84260:1941786] LOG SocketEngine: Got message: Welcome to socket.io.
2016-07-15 16:13:49.324 MyApp[84260:1941786] ERROR SocketIOClient: Got unknown error from server Welcome to socket.io.
2016-07-15 16:13:49.326 MyApp[84260:1941786] LOG SocketIOClient: Handling event: error with data: (
"Got unknown error from server Welcome to socket.io."
)
时,我得到了这个回复:
socket.io.js
我尝试更改xcode/internal/socket.io/1/
文件或Welcome to socket.io
的路径,但它们都给出了相同的响应,而{{1}}被替换为该文件的内容。< / p>
答案 0 :(得分:0)
尝试将#' subsets to list
aSubset <- lapply(1:5, FUN = function(X){
eval(parse(text = sprintf("subset(data, AD%d == 1)", X)))
})
#' assuming your original data came from a data.frame,
colNames <- c('u','v','w','x','z')
#' for each list element, calculate column means. I suggest modifying
#' the output to the structure you want, i.e. by using llply or etc
require(plyr)
adMeans <- ldply(aSubset, function(x){
colMeans(x[, colNames])
})
#' for a clearer output, these might be useful:
colnames(adMeans) <- colNames
rownames(adMeans) <- sprintf('AD%d', 1:5)
作为协议,如下所示:
ws
答案 1 :(得分:0)
在服务器端和客户端检查socket.io版本,两者不匹配可能是导致此错误的原因
答案 2 :(得分:0)
我已将 swift 客户端框架更新到最新的 16.0.1
版本。但是这个错误发生了。还有一个未解决的问题:https://github.com/socketio/socket.io-client-swift/issues/1355
我通过恢复到旧的稳定版本来解决这个问题:
pod 'Socket.IO-Client-Swift', '~> 15.2.0'