ds_socket_io_websocket_provider 0.0.1 copy "ds_socket_io_websocket_provider: ^0.0.1" to clipboard
ds_socket_io_websocket_provider: ^0.0.1 copied to clipboard

Socket.IO WebSocket provider for DartStream.

DartStream Socket.IO WebSocket Provider #

Socket.IO provider for DartStream using the socket_io_client package.

Install #

dependencies:
  ds_websocket_base: ^0.0.1
  ds_socket_io_websocket_provider: ^0.0.1

Usage #

import 'package:ds_websocket_base/ds_websocket_base_export.dart';
import 'package:ds_socket_io_websocket_provider/ds_websocket_socket_io_export.dart';

final config = {
  'name': 'socketio',
};

registerSocketIoWebSocketProvider(config);

final socket = DSWebSocketManager('socketio');
await socket.connect('https://example.com', options: {
  'transports': ['websocket'],
});

socket.on('message', (data) {
  print('Received: $data');
});

socket.emit('message', {'hello': 'world'});

Configuration #

  • name (optional, default socketio)
  • headers (optional, passed via extraHeaders)
  • options (optional, passed to socket_io_client)
0
likes
130
points
31
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Socket.IO WebSocket provider for DartStream.

Repository (GitHub)
View/report issues
Contributing

License

unknown (license)

Dependencies

ds_websocket_base, socket_io_client

More

Packages that depend on ds_socket_io_websocket_provider