Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kuyoonjo/tauri-plugin-udp


https://github.com/kuyoonjo/tauri-plugin-udp

Last synced: 22 days ago
JSON representation

Awesome Lists containing this project

README

        

# tauri-plugin-udp

This plugin only works with Tauri 2.x only.

## Install

```bash
cargo add tauri-plugin-udp
```
```bash
npm i @kuyoonjo/tauri-plugin-udp
```

## Usage

### rust
```rust

tauri::Builder::default()
.plugin(tauri_plugin_udp::init())
...
```

### javascript
```javascript
import { bind, send } from "@kuyoonjo/tauri-plugin-udp";
import { listen } from "@tauri-apps/api/event";

const id = 'unique-id';
await bind(id, '0.0.0.0:8080');
await send(id, '192.168.1.2:9090', 'hello');
await unbind(id);

await listen("plugin://udp", (x) => console.log(x.payload));

```

## Support

| MacOS | Linux | Windows |
| ----- | ----- | ------- |
| ✅ | ✅ | ✅ |