vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

Function UDPConnection.recv

Receives a single packet.

ubyte[] recv (
  ubyte[] buf = null,
  NetworkAddress* peer_address = null
) @safe;

ubyte[] recv (
  core.time.Duration timeout,
  ubyte[] buf = null,
  NetworkAddress* peer_address = null
) @safe;

If a buffer is given, it must be large enough to hold the full packet.

The timeout overload will throw an Exception if no data arrives before the specified duration has elapsed.

Authors

Sönke Ludwig

Copyright

© 2012-2016 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.