पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv0.4.0

eventsource

Server-Sent Events का एक क्लाइंट और सर्वर वास्तुकला।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
595
लाइक
30
Pub अंक
120

पैकेज इंस्टॉल करें

flutter pub add eventsource

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

एक डार्ट पैकेज जो सर्वर-सेंट इवेंट्स (SSE) के लिए क्लाइंट और सर्वर इम्प्लीमेंटेशन प्रदान करता है, जिससे सर्वर से क्लाइंट तक रियल-टाइम, एक दिशा में संचार संभव होता है। यह HTTP के ऊपर इवेंट्स को स्ट्रीमिंग सपोर्ट करता है, जिससे यह लाइव अपडेट्स, नोटिफिकेशन और डेटा फीड्स के लिए आदर्श है। यह पैकेज सभी प्रमुख प्लेटफॉर्म जैसे Android, iOS, Web, macOS, Windows और Linux में संगत है। यह SSE मानक का पालन करता है और इवेंट आईडी, रिट्राई अंतराल और कस्टम इवेंट प्रकार का समर्थन करता है। इम्प्लीमेंटेशन हल्का है और Flutter और डार्ट एप्लिकेशन में आसानी से एकीकृत होता है।

उपयोग

  • लाइव नोटिफिकेशन्स
  • वास्तविक समय डेटा प्रवाह
  • सर्वर-पक्ष घटना प्रसारण
  • वेब एप्लिकेशन में स्थिति अद्यतन
  • इंटरैक्टिव डैशबोर्ड
  • लॉग स्ट्रीमिंग

मुख्य विशेषताएँ

  • पूर्ण SSE प्रोटोकॉल समर्थन
  • प्लेटफॉर्म के अनुकूलता
  • घटना ID और पुनर्प्रयास संभाल
  • कस्टम इवेंट प्रकार समर्थन
  • हल्का और कुशल
  • Flutter के साथ आसान एकीकरण

इनके लिए उपयुक्त

  • रियल-टाइम ऐप फीचर्स
  • पुश क्षमता की आवश्यकता वाली बैकएंड सेवाएं
  • कम लेटेंसी अपडेट की आवश्यकता वाले ऐप्स
  • लाइव कंटेंट वाले वेब और मोबाइल ऐप्स
  • पूर्ण-स्टैक एप्लिकेशन के लिए डार्ट/फ्लटर का उपयोग करने वाले विकासकर्मी

विचार योग्य बातें

  • द्विदिश आवाज के लिए उपयुक्त नहीं
  • एक संगत सर्वर कार्यान्वयन की आवश्यकता है
  • सर्वर से क्लाइंट तक स्ट्रीमिंग तक सीमित
  • प्रमाणीकरण के लिए अतिरिक्त सेटअप की आवश्यकता हो सकती है
  • उच्च आवृत्ति, कम देरी वाले अपडेट्स के लिए सबसे उपयुक्त

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

eventsource

A library for using EventSource or Server-Sent Events (SSE). Both client and server functionality is provided.

This library implements the interface as described here.

Client usage

For more advanced usage, see the example/ directory. Creating a new EventSource client is as easy as a single call. The http package is used under the hood, so wherever this package works, this library will also work. Browser usage is slightly different.

EventSource eventSource = await EventSource.connect("http://example.com/events");
// in browsers, you need to pass a http.BrowserClient:
EventSource eventSource = await EventSource.connect("http://example.com/events", 
    client: new http.BrowserClient());

Server usage

We recommend using shelf_eventsource for serving Server-Sent Events. This library provides an EventSourcePublisher that manages subscriptions, channels, encoding. We refer to documentation in the shelf_eventsource package for more information.

This library also includes a server provider for dart:io's HttpServer in io_server.dart. However, it has some issues with data flushing that are yet to be resolved, so we recommend using shelf instead.

Licensing

This project is available under the MIT license, as can be found in the LICENSE file.

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 5 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।