{"repo":"rikulo/socket.io-client-dart","free":true,"listed":false,"github":"https://github.com/rikulo/socket.io-client-dart","clone":"git clone https://github.com/rikulo/socket.io-client-dart.git","description":"socket.io-client-dart: Dartlang port of socket.io-client https://github.com/socketio/socket.io-client","language":"Dart","stars":701,"topics":["dart","socket-io","quire","websocket","dartlang","socket-io-client","flutter"],"license":"MIT","category":"mobile-apps","readme_excerpt":"socket.io-client-dart Port of awesome JavaScript Node.js library - Socket.io-client v2. v4. - in Dart Version info socket.io-client-dart Socket.io Server --------------------- ----------------- v0.9. v1. v2. v2. v3. v4.6. v3. v4.7. v4. Usage Dart Server Dart Client Connect manually To connect the socket manually, set the option autoConnect: false and call .connect() . For example, Socket socket = io('http://localhost:3000', OptionBuilder() .setTransports(['websocket']) // for Flutter or Dart VM . disableAutoConnect() // disable auto-connection .setExtraHeaders({'foo': 'bar'}) // optional .build() ); socket.connect(); Note that .connect() should not be called if autoConnect: true (by default, it's enabled to true), as this will cause all event handlers to get registered/fired twice. See Issue #33. Update the extra headers Custom WebSocket connector Use setWebSocketConnector to plug in a custom WebSocket implementation — for example CupertinoWebSocket / OkHttpWebSocket from package:cupertino http / package:cronet http , or a dart:io HttpClient with custom TLS/proxy settings. The connector receives the extraHeaders you set via setExtraHeaders (forwarded on native; browsers cannot send custom headers on the WebSocket handshake, so they are ignored there). Migrating from setHttpClientAdapter HttpClientAdapter and OptionBuilder.setHttpClientAdapter() are deprecated since 3.1.6 and will be removed in 4.0.0. (They were unintentionally dropped in 3.1.5 — see #442 — and restored as dep","default_branch":null,"files":null,"tree":[],"storefront":"/r/rikulo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rikulo/socket.io-client-dart/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}