cereb_frontend_websocket_shadow_sdk 1.0.2 copy "cereb_frontend_websocket_shadow_sdk: ^1.0.2" to clipboard
cereb_frontend_websocket_shadow_sdk: ^1.0.2 copied to clipboard

sdk for cereb websocket shadow

frontend-websocket-shadow-sdk #

使用方法 #

pubspec.yaml

git

dependencies:
  frontend_websocket_shadow_sdk:
    git:
      url: git://github.com/cereb-ai/frontend-websocket-shadow-sdk.git
      ref: main

本地

dependencies:
  frontend_websocket_shadow_sdk:
    path: /path/to/frontend-websocket-shadow-sdk

客户端

final client = CerebWebsocketShadowSdk(
  url: "https://dev-api.cereb.ai/v1/ws/shadow_websocket",
  path: "/user/topic/shadow_websocket",
  id: "A791716517900154M",
);
client.connect();
client.subscribe(
  '/user/topic/shadow_websocket',
  (StompFrame frame) {
    log(frame.body ?? 'null');
  },
);
client.send('test');
client.unsubscribe('/user/topic/shadow_websocket');
client.disconnect();

服务器配置 websocket

发送消息 send message

单元测试 #

flutter test

参考项目 #

frontend-iotena-app

发布项目 #

github action

git tag #

git tag -a v1.0.2 -m "release version 1.0.2"
git push origin v1.0.2
0
likes
115
points
15
downloads

Publisher

unverified uploader

Weekly Downloads

sdk for cereb websocket shadow

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter, stomp_dart_client

More

Packages that depend on cereb_frontend_websocket_shadow_sdk