We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client.r文件代码
~ vi client.r library(websockets) #加载类库 client = websocket("ws://192.168.1.201",port=7681) #创建客户端实例 rece<-function(DATA, WS, HEADER) { D='' if(is.raw(DATA)){ cat("raw data") D = rawToChar(DATA) } cat("==>",D,"\n")} #监听receive set_callback("receive",rece, client) websocket_write("2222", client) #向服务器发请求 service(client) #输出服务器的返回值 websocket_close(client) #关闭连接
代码没换行,改为:
library(websockets) #加载类库 client = websocket("ws://192.168.1.201",port=7681) #创建客户端实例 rece<-function(DATA, WS, HEADER) { D='' if(is.raw(DATA)){ cat("raw data") D = rawToChar(DATA) } cat("==>",D,"\n") } set_callback("receive",rece, client) #监听receive websocket_write("2222", client) #向服务器发请求 service(client) #输出服务器的返回值 websocket_close(client) #关闭连接 }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
client.r文件代码
代码没换行,改为:
The text was updated successfully, but these errors were encountered: