You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently you have to call recv in a loop on an UDP socket.
So you have to specify a buffer of a fixed size, which might be too small or too large.
One solution would be to just return an allocated buffer if undefined is passed to recv.
However IMHO an (alternative) event/callback based API would be more suitable, since it is more in line how libuv works. Currently libuv is registering and unregistering a callback on each recv(…).
This also applies for TCP sockets, though I didn't look at that in detail.
The text was updated successfully, but these errors were encountered:
Currently you have to call
recv
in a loop on an UDP socket.So you have to specify a buffer of a fixed size, which might be too small or too large.
One solution would be to just return an allocated buffer if undefined is passed to recv.
However IMHO an (alternative) event/callback based API would be more suitable, since it is more in line how libuv works. Currently libuv is registering and unregistering a callback on each
recv(…)
.This also applies for TCP sockets, though I didn't look at that in detail.
The text was updated successfully, but these errors were encountered: