# simudp

> dgram module for the browser thru a proxy based on socket.io

Latest version **0.0.16** (published 2013-03-17) · 0 weekly downloads

## Install

```sh
npm install simudp
pnpm add simudp
yarn add simudp
bun add simudp
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.16 |
| Published | 2013-03-17 |
| First published | 2012-05-24 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.4.12 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | alexstrat |
| Maintainers | alexstrat |

## Links

- npm: https://www.npmjs.com/package/simudp
- Repository: https://github.com/alexstrat/simudp
- npm.io page: https://npm.io/package/simudp

## Dependencies (3)

- [socket.io](https://npm.io/package/socket.io.md) >0.9.11
- [browserify](https://npm.io/package/browserify.md) >2.7
- [socket.io-client](https://npm.io/package/socket.io-client.md) ~0.9

## Recent versions

- 0.0.16 (latest) — 2013-03-17
- 0.0.14 — 2012-06-10
- 0.0.13 — 2012-06-10
- 0.0.12 — 2012-06-10
- 0.0.11 — 2012-05-24
- 0.0.1 — 2012-05-24

## README

**Simudp** : udp for the browser.

Imitates exactly the [dgram](http://nodejs.org/api/dgram.html) API in the browser and backed by [socket.io](http://socket.io)/UDP proxy.

### Installation

```bash
$ npm install simudp
```

### Runs the proxy server :

```js
var server = require('http').createServer();

require('simudp').listen(server);

server.listen(8080);
```

### In the browser

```html
<!-- you need to serve SimUDP.js by your own -->
<script src="/SimUDP.js"></script>
<script>
  
var socket = SimUDP.createSocket('udp4');

var hello = new SimUDP.Buffer('hello');

socket.send(hello, 0, hello.length, 3000, 'anywhere.com');

socket.on('message', function(buf, rinfo) {
  //...
});

//you've understood, it's dgram for the browser...
</script>
```

### Doc

Read the [source](https://github.com/alexstrat/simudp/blob/master/lib/simudp.js) or [ask around](https://github.com/alexstrat/simudp/issues).

### Browserify support

Simudp is fully compatible with [browserfy](https://github.com/substack/node-browserify). Best way is to use directly [dgram-browserify](https://github.com/alexstrat/dgram-browserify).

---
_Source: https://npm.io/package/simudp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
