profile
viewpoint

hazae41/mc-kutils 21

The ultimate Kotlin library for Minecraft plugin development

hazae41/mc-chestui 8

Powerful GUI builder for Minecraft

hazae41/mc-multisockets 7

WebSockets for Minecraft servers and proxies

hazae41/kotlin-compiler-gui 6

Quickly compile Kotlin classes (.kt) and run Kotlin scripts (.kts)

hazae41/mc-blockregen 6

No more extra resources world! No more crappy world!

hazae41/kheyboard 2

Clavier Risibank pour Android

hazae41/mc-motdpass 2

Get true MOTDs of your servers

hazae41/mc-sudo 2

Execute commands as op, as full-permission, as another player

hazae41/mc-timetaxes 2

Hourly, daily, weekly, monthly taxes for your players

hazae41/ipfs-fetcher 1

Fetch all resources of a hash to any gateway

startedSoft/xcolor

started time in 11 hours

create barnchhazae41/deno-events

branch : master

created branch time in 12 hours

created repositoryhazae41/deno-events

Typed and mutable events for deno-js

created time in 13 hours

issue commentdenoland/deno

Expose zlib ops

How about https://github.com/image-rs/inflate or https://github.com/sile/libflate ?

hazae41

comment created time in a day

issue commentdenoland/deno

[bug] Permission denied on Deno.open() on Windows directories

I don't think open() can work with a folder since it opens the resource for read/write.

If you want to work with folders you can use mkdir() (IIRC) to create one and list its files with other functions

cknight

comment created time in a day

issue commentdenoland/deno

Fix UDP tests on Windows

It seems that, on Windows, sending to a local port freezes when the port is not yet open.

Therefore, the following code:

await send()
await receive()

is blocking at await send()

Alternatively, the following code

await receive()
await send()

is blocking at receive() since the data is sent after

Thus, I think the only solutions would be:

  • to disable netUdpSendReceive()
  • to use another machine in order to send/receive
ry

comment created time in 2 days

issue commentdenoland/deno

Fix UDP tests on Windows

I managed to not have errors by changing ports used.

testPerm({ net: true }, function netUdpListenClose(): void {
  //if (Deno.build.os === "win") return; // TODO

  const socket = Deno.listen({
	hostname: "127.0.0.1",
	port: 4600,
	transport: "udp"
  });
  assertEquals(socket.addr.transport, "udp");
  assertEquals(socket.addr.hostname, "127.0.0.1");
  assertEquals(socket.addr.port, 4600);
  socket.close();
});

testPerm({ net: true }, async function netUdpSendReceive(): Promise<void> {
  if (Deno.build.os === "win") return; // TODO

  const alice = Deno.listen({ port: 4601, transport: "udp" });
  assertEquals(alice.addr.port, 4601);
  assertEquals(alice.addr.hostname, "0.0.0.0");
  assertEquals(alice.addr.transport, "udp");

  const bob = Deno.listen({ port: 4602, transport: "udp" });
  assertEquals(bob.addr.port, 4602);
  assertEquals(bob.addr.hostname, "0.0.0.0");
  assertEquals(bob.addr.transport, "udp");

  const sent = new Uint8Array([1, 2, 3]);
  await alice.send(sent, bob.addr);

  const [recvd, remote] = await bob.receive();
  assertEquals(remote.port, 4601);
  assertEquals(recvd.length, 3);
  assertEquals(1, recvd[0]);
  assertEquals(2, recvd[1]);
  assertEquals(3, recvd[2]);
});

But netUdpSendReceive still freezes

ry

comment created time in 2 days

issue commentdenoland/deno

Fix UDP tests on Windows

netUdpListenCloseWhileIterating works well

ry

comment created time in 2 days

issue commentdenoland/deno

Fix UDP tests on Windows

First bug

FAIL netUdpListenClose
PermissionDenied: Une tentative d’accès à un socket de manière interdite par ses autorisations d’accès a été tentée. (os error 10013)
at Object.constructError ($deno$/errors.ts:39:13)
at unwrapResponse ($deno$/dispatch_json.ts:41:12)
at Object.sendSync ($deno$/dispatch_json.ts:70:10)
at Object.listen ($deno$/net.ts:255:15)
at Object.netUdpListenClose [as fn] ...

Translated

An attempt was made to access a socket in a manner prohibited by its access permissions.

The second one

FAIL  netUdpSendReceive
AddrInUse: Une seule utilisation de chaque adresse de socket (protocole/adresse réseau/port) est habituellement autorisée. (os error 10048)
at Object.constructError ($deno$/errors.ts:49:13)
at unwrapResponse ($deno$/dispatch_json.ts:41:12)
at Object.sendSync ($deno$/dispatch_json.ts:70:10)
at Object.listen ($deno$/net.ts:255:15)
at Object.netUdpSendReceive [as fn] ...

Translated

Only one use of each socket address (protocol/network address/port) is usually allowed.
ry

comment created time in 2 days

issue commentdenoland/deno

Fix UDP tests on Windows

Everything works well on my virtualized Windows 10

Maybe it's a problem with the machine used in Github Actions?

ry

comment created time in 2 days

issue commentdenoland/deno

CI fails on Windows

This works well for me on virtualized Windows 10

// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assert, assertEquals } from "../../testing/asserts.ts";
import { TextProtoReader } from "../../textproto/mod.ts";
import { BufReader } from "../../io/bufio.ts";
import { connectWebSocket, WebSocket } from "../../ws/mod.ts";

let server: Deno.Process | undefined;
async function startServer(): Promise<void> {
  server = Deno.run({
	args: [Deno.execPath(), "--allow-net", "--allow-read", "server.ts"],
	cwd: "examples/chat",
	stdout: "piped"
  });
  try {
	assert(server.stdout != null);
	const r = new TextProtoReader(new BufReader(server.stdout));
	const s = await r.readLine();
	assert(s !== Deno.EOF && s.includes("chat server starting"));
  } catch {
	server.close();
  }
}

const { test } = Deno;

test("beforeAll", async () => {
  await startServer();
});

test("GET / should serve html", async () => {
  const resp = await fetch("http://127.0.0.1:8080/");
  assertEquals(resp.status, 200);
  assertEquals(resp.headers.get("content-type"), "text/html");
  const html = await resp.body.text();
  assert(html.includes("ws chat example"), "body is ok");
});

let ws: WebSocket | undefined;
test("GET /ws should upgrade conn to ws", async () => {
  ws = await connectWebSocket("http://127.0.0.1:8080/ws");
  const it = ws.receive();
  assertEquals((await it.next()).value, "Connected: [1]");
  ws.send("Hello");
  assertEquals((await it.next()).value, "[1]: Hello");
});
test("afterAll", () => {
  server?.close();
  ws?.conn.close();
});
uki00a

comment created time in 2 days

issue commentdenoland/deno

[bug] Permission denied on Deno.open() on Windows

It work well for me

cd /test
deno --allow-read --allow-write ./test.ts

Content of "test.ts":

await Deno.open("test", "x+")

Maybe the fold you work with has OS restriction or is open by another process

cknight

comment created time in 2 days

issue commentdenoland/deno

Support HTTP/2, HTTP/3 and QUIC

https://github.com/denoland/deno/issues/1558

kitsonk

comment created time in 2 days

issue commentdenoland/deno

Support unix domain sockets

Here is the API I propose

Deno.listen({ transport: "unix", socket: "/var/run/mysocket" }): UnixConn

Deno.connect({ transport: "unix", socket: "/var/run/mysocket" }): UnixConn

class UnixConn would be similar to UDPConn and Go's definition https://golang.org/pkg/net/#UnixConn

teleclimber

comment created time in 2 days

issue commentdenoland/deno

[bug] Permission denied on Deno.open() on Windows

Try running it with an admin terminal

cknight

comment created time in 2 days

startedtldr-pages/tldr

started time in 2 days

issue commentdenoland/deno

Expose zlib ops

For the API, I propose to use ZlibEncoder/ZlibDecoder that takes an Uint8Array and some params, and ZlibWriter/ZlibReader classes that encapsulates a Writer/Reader and exposes read/write functions

class ZlibEncoder(options)
    encode(Uint8Array): a new Uint8Array

class ZlibDecoder(options)
    decode(Uint8Array): a new Uint8Array

class ZlibReader(Reader, options)
    read(Uint8Array): number of bytes written

class ZlibWriter(Writer, options)
    write(Uint8Array): number of bytes written

For the Rust<->Deno pipeline, we would just use ZeroCopyBufs

hazae41

comment created time in 3 days

issue openeddenoland/deno

Expose zlib ops

How can I expose zlib ops from rusty_v8 to deno?

created time in 6 days

push eventhazae41/deno

hazæ41

commit sha 7bd9de7d1dc1837de4094b4571137567b705e175

disabled tests for windows

view details

push time in 6 days

delete branch hazae41/deno

delete branch : zlib

delete time in 6 days

create barnchhazae41/deno

branch : zlib

created branch time in 6 days

pull request commentdenoland/deno

Add UDP support

@hazae41 Can you just disable the UDP tests on windows and add a TODO to fix them?

How do I do that specifically for Windows?

hazae41

comment created time in 6 days

issue commentdenoland/deno

Where is zlib?

How can I expose them?

hazae41

comment created time in 7 days

issue commentdenoland/deno

Where is zlib?

Is there plans to add it to std?

hazae41

comment created time in 7 days

issue commentdenoland/deno

Where is zlib?

Why is it no longer in std?

hazae41

comment created time in 7 days

issue openeddenoland/deno

Where is zlib?

It seems it was there: https://deno.land/std/zlib/ But it is not longer available, and https://deno.land/std/ does not have it

Also, I found a PR that removed it from third parties: https://github.com/denoland/deno/pull/2958

So, where did it go?

created time in 7 days

fork hazae41/RakLib

RakNet server implementation written in PHP

fork in 9 days

pull request commentdenoland/deno

Add UDP support

Oh looks like windows isn’t working. I thought it was green before? We’ll have to figure that out first.

Do you have an idea of the cause?

hazae41

comment created time in 9 days

issue closeddenoland/deno

Support UDP sockets

I'm working on an software that needs to receive UDP packets. And since Deno only supports TCP, I'm using a node-js frontend that transmits UDP packets to my deno backend through websockets.

I was wondering if there are plans to add UDP support to Deno, and if so, what's the roadmap, what prevent us from adding it right now?

I would be very happy to have positive answers, it would allow me to only use Deno for my project.

closed time in 10 days

hazae41

push eventhazae41/deno

hazæ41

commit sha b7d462fa08c622ea0ae4e572f6b140304b340e79

removed benchmark

view details

hazæ41

commit sha 0c970b134a343014527f507e687090e1407d970a

Merge remote-tracking branch 'origin/master'

view details

push time in 10 days

Pull request review commentdenoland/deno

Add UDP support

 def http_benchmark(build_dir):     return {         # "deno_tcp" was once called "deno"         "deno_tcp": deno_tcp(deno_exe),+        # "deno_udp": deno_udp(deno_exe),

Yes, I do it now

hazae41

comment created time in 10 days

pull request commentdenoland/deno

Add UDP support

@hazae41 Looks good. I'm ready to land this - are there any TODOs that need to be done that I've missed?

Ready to merge

hazae41

comment created time in 10 days

Pull request review commentdenoland/deno

Add UDP support

 def http_benchmark(build_dir):     return {         # "deno_tcp" was once called "deno"         "deno_tcp": deno_tcp(deno_exe),+        # "deno_udp": deno_udp(deno_exe),

Because the benchmark script works with a HTTP server, which relies on TCP, so it does not work with UDP, therefore I disabled it until the benchmark script supports UDP.

hazae41

comment created time in 10 days

push eventhazae41/deno

hazæ41

commit sha 5a20128b017cab6effe260feb3bbe62ba3186491

disable benchmark

view details

push time in 10 days

push eventhazae41/deno

hazæ41

commit sha d66a31c367f7a614b479a2bfca7ad65b3e812357

still correctly handles socket closing

view details

push time in 10 days

push eventhazae41/deno

hazæ41

commit sha 9c0a126e1c8f042aea781fe0d1cb2766e8111e34

correctly handles socket closing

view details

push time in 10 days

push eventhazae41/deno

hazæ41

commit sha 13774886f68a968808674753ce3ab2966a65b597

fixed listen() return type, fixed tests

view details

push time in 10 days

push eventhazae41/deno

hazæ41

commit sha e17f82861c6012ba472766142ed93f3a8720da13

fixed "async in ambient context"

view details

push time in 10 days

push eventhazae41/deno

hazæ41

commit sha b697eea3294013a08460e0ff482ff1656e918316

prettier

view details

push time in 12 days

push eventhazae41/deno

hazæ41

commit sha eb1dc1483bcbdf8950c23219b2a3c2fe7bf26509

fix recvfrom return type

view details

push time in 12 days

push eventhazae41/deno

hazæ41

commit sha 95c36ef8673d75859bd3d8fd3ee4a09250880058

fixed deno_udp.ts

view details

push time in 12 days

push eventhazae41/deno

hazæ41

commit sha 2fb48ebbb7c0893a4e96de74cb2a4024dff41853

prettier

view details

push time in 12 days

push eventhazae41/deno

hazæ41

commit sha 5b22e112fae8389e0dcd709759e301275ac48e7f

added test netUdpSendReceive()

view details

push time in 12 days

push eventhazae41/deno

hazæ41

commit sha 0807f283076f7be78a37beeec23c25a0631ec8b9

added function recvfrom(rid, buf) and refactof UDPConn::receive to use this new function

view details

push time in 12 days

Pull request review commentdenoland/deno

Add UDP support

 export class ListenerImpl implements Listener {   } } +export class UDPConnImpl implements UDPConn {+  constructor(+    readonly rid: number,+    readonly addr: Addr,+    public bufSize: number = 1024,+    private closing: boolean = false+  ) {}++  async receive(): Promise<[Uint8Array, Addr]> {+    const p = new Uint8Array(this.bufSize);

I made it optional, creating a new buffer in no one is passed

hazae41

comment created time in 12 days

push eventhazae41/deno

hazæ41

commit sha 9e2550ec2c5780fa74336661c771659fcaa5dd80

allow passing optional buffer in receive(p?: Uint8Array)

view details

push time in 12 days

push eventhazae41/deno

hazæ41

commit sha 4a5acb49413f47f82dd6884a70b516a32e74cd9b

remove logs from benchmark

view details

push time in 13 days

Pull request review commentdenoland/deno

Add UDP support

 export class ListenerImpl implements Listener {   } } +export class UDPConnImpl implements UDPConn {+  constructor(+    readonly rid: number,+    readonly addr: Addr,+    public bufSize: number = 1024,+    private closing: boolean = false+  ) {}++  async receive(): Promise<[Uint8Array, Addr]> {+    const p = new Uint8Array(this.bufSize);

This is not compatible with the iterator properties of UDPConn, we could not do the following:

for await (const msg of socket){
    // ...
}
hazae41

comment created time in 13 days

push eventhazae41/deno

hazæ41

commit sha 05f52db6d5ff0d227777d89a730ee2fecf0e0f6a

Rust: restore local_addr from listen_udp()

view details

push time in 13 days

push eventhazae41/deno

hazæ41

commit sha 1b0278c5bb9a309ac8fa52732f357a0bc4993429

Rust: removed local_addr from UdpSocketResource

view details

push time in 13 days

push eventhazae41/deno

hazæ41

commit sha 90751d6bae7a62e4d5bad144a47197b377402827

fix lint

view details

push time in 13 days

push eventhazae41/deno

hazæ41

commit sha 5823cd255f45c5bde10507c68e0b70fb406b3b6d

rename in deno.ts

view details

push time in 13 days

push eventhazae41/deno

hazæ41

commit sha 13d12062dc47ae22fef4e5e8dc417009f62909bd

fix linter

view details

push time in 14 days

push eventhazae41/deno

hazæ41

commit sha e83b15b1893c1789f4d090341d5bb1197f63e98b

rename PartialAddr to UDPAddr (bis)

view details

push time in 14 days

push eventhazae41/deno

hazæ41

commit sha 45f4acd3ad570381857bbf98fd5e6fc716a62133

rename PartialAddr to UDPAddr

view details

push time in 14 days

push eventhazae41/deno

hazæ41

commit sha 20f74a7f04f5fa77db7a0777531d4b3b1ee98877

rename Socket to UDPConn

view details

push time in 14 days

push eventhazae41/deno

hazæ41

commit sha 0e372a4b5ef2fa55d799b3d1ac824ceaf5ea4b14

added more tests, added UNSAFE comments

view details

push time in 14 days

push eventhazae41/deno

hazæ41

commit sha 4cdd469ba401d9de1341d9e8a7bfb1a996a3b588

fix linter

view details

push time in 14 days

push eventhazae41/deno

hazæ41

commit sha 3d717d6737278f150b62a402aade3707cf5f0d93

fix listen() return type when transport is undefined

view details

push time in 14 days

push eventhazae41/deno

hazæ41

commit sha b57dbcb9fbc8776711c9b071f5a03fc53eabe7e1

fix listen() header

view details

push time in 14 days

push eventhazae41/deno

hazæ41

commit sha ccd1579dd4dca4ff0166d441f1cd2eef1267ac5e

now using zero copy buffers!

view details

push time in 14 days

push eventhazae41/deno

hazæ41

commit sha f5ab0248bd4b1a97b5509e81891f5ecf8d7d3e0a

copied types defs, fixed benchmark, added PartialAddr

view details

push time in 14 days

Pull request review commentdenoland/deno

Add UDP support

 export class ListenerImpl implements Listener {   } } +export class SocketImpl implements Socket {+  constructor(+    readonly rid: number,+    public addr: Addr,+    private closing: boolean = false+  ) {}++  async receive(): Promise<Message> {+    const res = await sendAsync(dispatch.OP_RECEIVE, { rid: this.rid });+    const buffer = new Uint8Array(res.buffer);+    return [buffer, res.remoteAddr];+  }++  async send(buffer: Uint8Array, rem: Addr): Promise<void> {

?

hazae41

comment created time in 14 days

Pull request review commentdenoland/deno

Add UDP support

 export class ListenerImpl implements Listener {   } } +export class SocketImpl implements Socket {+  constructor(+    readonly rid: number,+    public addr: Addr,+    private closing: boolean = false+  ) {}++  async receive(): Promise<Message> {+    const res = await sendAsync(dispatch.OP_RECEIVE, { rid: this.rid });+    const buffer = new Uint8Array(res.buffer);+    return [buffer, res.remoteAddr];+  }++  async send(buffer: Uint8Array, rem: Addr): Promise<void> {+    const remote = { hostname: "127.0.0.1", transport: "udp", ...rem };+    if (remote.transport !== "udp") throw Error("Remote transport must be UDP");+    const args = { ...remote, rid: this.rid, buffer: Array.from(buffer) };+    await sendAsync(dispatch.OP_SEND, args);+  }

How can I do that?

hazae41

comment created time in 14 days

issue openeddenoland/deno

BUG: Outdated types on script runtime

Hello, I modified Deno for PR https://github.com/denoland/deno/pull/3946 and built it (in debug and release mode). Then I tried it with different runtimes: REPL, JS script, TS script.

The problem occurs on the updated type:

type Transport = "tcp";

which is now

type Transport = "tcp" | "udp";

And this is the line I tried to run on each runtime:

Deno.listen({ port: 80, transport: "udp" })

Here are my results:

  • When I try to use the new type on the REPL, it works well.
  • Same when I try to use it on a JS script, it works fine too.
  • But when I try to use it in a TS script, it seems the types are still those of the normal version of Deno, not the modified one. So using "udp" as a Transport throws the following error: "udp" is not assignable to Transport

Maybe I did something wrong? Or the TS runtime is not updating modified types?

created time in 14 days

issue commentdenoland/deno

Support UDP sockets

PR is ready for review https://github.com/denoland/deno/pull/3946

hazae41

comment created time in 15 days

pull request commentdenoland/deno

Add UDP support

Ready for review / merge

hazae41

comment created time in 15 days

push eventhazae41/deno

hazæ41

commit sha 47bd6dc8c223fb75365ab84c267d008f4f9070aa

fixed lint

view details

push time in 15 days

push eventhazae41/deno

hazæ41

commit sha 4e146094a222d71b2ce524e769ffe10bbcae4afa

improved types and method signatures, added benchmark for UDP

view details

push time in 15 days

push eventhazae41/deno

hazæ41

commit sha 381028033e27c2ac38bd20ce7770e2769e086918

fixed op_send() lint error

view details

push time in 15 days

push eventhazae41/deno

hazæ41

commit sha 80a8ec9724e6aa506a2a0865257ad2b4cb73ee93

fixed listen()

view details

push time in 15 days

push eventhazae41/deno

hazæ41

commit sha 01fe382721e9f355e1d022cf199add8626180091

fixed op_receive()

view details

push time in 16 days

Pull request review commentdenoland/deno

Add UDP support

 fn op_accept(   Ok(JsonOp::Async(op.boxed_local())) } +#[derive(Deserialize)]+struct ReceiveArgs {+  rid: i32,+}++fn op_receive(+  state: &State,+  args: Value,+  _zero_copy: Option<ZeroCopyBuf>,+) -> Result<JsonOp, ErrBox> {+  let args: ReceiveArgs = serde_json::from_value(args)?;+  let rid = args.rid as u32;+  let state_ = state.clone();++  let op = async move {+    let mut state = state_.borrow_mut();++    let resource = state+      .resource_table+      .get_mut::<UdpSocketResource>(rid)+      .ok_or_else(bad_resource)?;++    let socket = &mut resource.socket;+    let mut buf = vec![0; 8192];++    let (_size, remote_addr) = socket.recv_from(&mut buf).await?;

Found: let mut buf = vec![0u8; 1024].into_boxed_slice(); then using &'a mut Buf in the struct

hazae41

comment created time in 16 days

Pull request review commentdenoland/deno

Add UDP support

 fn op_accept(   Ok(JsonOp::Async(op.boxed_local())) } +#[derive(Deserialize)]+struct ReceiveArgs {+  rid: i32,+}++fn op_receive(+  state: &State,+  args: Value,+  _zero_copy: Option<ZeroCopyBuf>,+) -> Result<JsonOp, ErrBox> {+  let args: ReceiveArgs = serde_json::from_value(args)?;+  let rid = args.rid as u32;+  let state_ = state.clone();++  let op = async move {+    let mut state = state_.borrow_mut();++    let resource = state+      .resource_table+      .get_mut::<UdpSocketResource>(rid)+      .ok_or_else(bad_resource)?;++    let socket = &mut resource.socket;+    let mut buf = vec![0; 8192];++    let (_size, remote_addr) = socket.recv_from(&mut buf).await?;

Thanks, you specified a Buf type for buf, how to create a Buf?

hazae41

comment created time in 16 days

Pull request review commentdenoland/deno

Add UDP support

 fn op_accept(   Ok(JsonOp::Async(op.boxed_local())) } +#[derive(Deserialize)]+struct ReceiveArgs {+  rid: i32,+}++fn op_receive(+  state: &State,+  args: Value,+  _zero_copy: Option<ZeroCopyBuf>,+) -> Result<JsonOp, ErrBox> {+  let args: ReceiveArgs = serde_json::from_value(args)?;+  let rid = args.rid as u32;+  let state_ = state.clone();++  let op = async move {+    let mut state = state_.borrow_mut();++    let resource = state+      .resource_table+      .get_mut::<UdpSocketResource>(rid)+      .ok_or_else(bad_resource)?;++    let socket = &mut resource.socket;+    let mut buf = vec![0; 8192];++    let (_size, remote_addr) = socket.recv_from(&mut buf).await?;

Thanks, but according to Tokio https://docs.rs/tokio/0.2.11/tokio/net/struct.UdpSocket.html#method.recv_from There is no method poll_recv_from

hazae41

comment created time in 16 days

push eventhazae41/deno

hazæ41

commit sha ae7fc8cad39a726ec372533877df6ac78fef680e

add TypeScript method overloading for listen()

view details

push time in 16 days

pull request commentdenoland/deno

Add UDP support

I need help fixing this

> const socket = Deno.listen({ port: 80, transport: "udp" })
undefined
> socket.receive()
Promise {}
> 
thread 'main' panicked at 'already mutably borrowed: BorrowError', src/libcore/result.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

By debugging with "println!", I found out that this occurs on op_receive() at socket.recv_from(&mut buf)

Is socket or buf (or both) already borrowed?

hazae41

comment created time in 16 days

issue commentdenoland/deno

Support UDP sockets

I found, [u8] becomes a JSON Array, then a JS Array, just convert the latter with new Uint8Array(array). To convert it back to a JS Array, use Array.from(buffer). Plus, Vec<u8> is preferred over [u8]

hazae41

comment created time in 16 days

push eventhazae41/deno

hazæ41

commit sha d8ec5d84c6cc040c98bcd7b9b5243084162825c5

fix listen()

view details

push time in 16 days

push eventhazae41/deno

hazæ41

commit sha 527e89400df08339b8b63d7923f24729e5688f3a

export Socket in deno.ts

view details

push time in 16 days

push eventhazae41/deno

hazæ41

commit sha 7d748658a8674bbcaa06fdc1392941202c096041

fix buffers

view details

push time in 16 days

Pull request review commentdenoland/deno

Add UDP support

 export interface ListenOptions {  *     listen({ hostname: "[2001:db8::1]", port: 80 });  *     listen({ hostname: "golang.org", port: 80, transport: "tcp" })  */-export function listen(options: ListenOptions): Listener {+export function listen(options: ListenOptions): Listener | Receiver {

This can't work because there will be two functions with the same name

hazae41

comment created time in 16 days

push eventhazae41/deno

hazæ41

commit sha 0a451a6f1bcfb4ab6129853559ba64fb786f4438

fix Socket interface

view details

push time in 16 days

push eventhazae41/deno

hazæ41

commit sha 8be142f9a38c916b2227517b2b38d83d6d1a3571

Renamed Receiver to Socket

view details

push time in 16 days

push eventhazae41/deno

hazæ41

commit sha b90424ccb55910a2f09bf874e1daeb8428534941

Added op_send

view details

push time in 16 days

issue commentdenoland/deno

Support UDP sockets

How to transfer a Rust "&mut [u8]" buffer to a JS "Uint8Array" buffer and vice-versa? I could not find how

hazae41

comment created time in 16 days

push eventhazae41/deno

hazæ41

commit sha 790d61ac3bde806b0dff6f98ff9e4eaf6872bf86

linter fix

view details

push time in 16 days

push eventhazae41/deno

hazæ41

commit sha 996c5493ec6f1ddce7a4d5a9eef9cd1b287b6bea

Cleaned op_listen and op_receive, removed op_connect

view details

push time in 16 days

push eventhazae41/deno

hazæ41

commit sha c669578d0097001801daf03f4757df224fa85655

JS: 2nd fix ReceiverImpl

view details

push time in 17 days

push eventhazae41/deno

hazæ41

commit sha f2fdcdd2ff7ca89d366f607261343834f69bada7

JS: fix ReceiverImpl and listen()

view details

push time in 17 days

push eventhazae41/deno

hazæ41

commit sha 26f0612bd8374bc1f95b1db3b812549e7746e599

JS: fix ReceiverImpl

view details

push time in 17 days

push eventhazae41/deno

hazæ41

commit sha 7876bd3efe6519370e907126d51ffb97bf5c92ff

Improved op_receive

view details

push time in 17 days

push eventhazae41/deno

hazæ41

commit sha 92d9f66544fc7b282a939a06ca7c0071679de6c0

Add "udp" feature to Tokio

view details

push time in 17 days

pull request commentdenoland/deno

Add UDP support

This PR follows this issue https://github.com/denoland/deno/issues/3942

hazae41

comment created time in 17 days

PR opened denoland/deno

Add UDP support

<!-- Before submitting a PR, please read https://deno.land/std/manual.md#contributing --> These need to be finished and/or fixed since I do not know Rust that much.

  • "Receive", an equivalent of "Accept" future but for UDP
  • "op_receive", operation to receive a message and send it back to JS
  • "op_listen" is untested
  • "op_connect" is untested
  • "op_send" and its JS counterpart need to be added in order to send some message
+234 -25

0 comment

3 changed files

pr created time in 17 days

push eventhazae41/deno

hazæ41

commit sha 73e12da04b69596dbedd06c281945fa40d2cb240

Added op_receive

view details

push time in 17 days

push eventhazae41/deno

hazæ41

commit sha 90a595795aca76c894ecd4bfe8951aea31e6feb5

Add OP_RECEIVE for UDP transport

view details

hazæ41

commit sha 87c602c718e045aff078ddb80987086bca20671f

Merge pull request #3 from hazae41/patch-3 Add OP_RECEIVE for UDP transport

view details

push time in 17 days

PR merged hazae41/deno

Add OP_RECEIVE for UDP transport

<!-- Before submitting a PR, please read https://deno.land/std/manual.md#contributing -->

+1 -0

0 comment

1 changed file

hazae41

pr closed time in 17 days

PR opened hazae41/deno

Add OP_RECEIVE for UDP transport

<!-- Before submitting a PR, please read https://deno.land/std/manual.md#contributing -->

+1 -0

0 comment

1 changed file

pr created time in 17 days

PR closed denoland/deno

Add OP_RECEIVE for UDP transport

<!-- Before submitting a PR, please read https://deno.land/std/manual.md#contributing -->

+1 -0

0 comment

1 changed file

hazae41

pr closed time in 17 days

more