summary refs log tree commit diff
path: root/msg_socket/Cargo.toml
diff options
context:
space:
mode:
authorDylan Reid <dgreid@chromium.org>2020-01-13 01:59:25 -0800
committerCommit Bot <commit-bot@chromium.org>2020-02-26 06:20:39 +0000
commit72ccaefe0f384f708b3d2fd71aa3f3b40ab4e3df (patch)
treed29b02393eedaedde8608ff7a6abc6efb3124c4e /msg_socket/Cargo.toml
parentdfd0139d7cf2935add342c76cec66702800e95b7 (diff)
downloadcrosvm-72ccaefe0f384f708b3d2fd71aa3f3b40ab4e3df.tar
crosvm-72ccaefe0f384f708b3d2fd71aa3f3b40ab4e3df.tar.gz
crosvm-72ccaefe0f384f708b3d2fd71aa3f3b40ab4e3df.tar.bz2
crosvm-72ccaefe0f384f708b3d2fd71aa3f3b40ab4e3df.tar.lz
crosvm-72ccaefe0f384f708b3d2fd71aa3f3b40ab4e3df.tar.xz
crosvm-72ccaefe0f384f708b3d2fd71aa3f3b40ab4e3df.tar.zst
crosvm-72ccaefe0f384f708b3d2fd71aa3f3b40ab4e3df.zip
msg_socket: Add async receiving of messages
Add a member to MsgSocket that effectively returns an async iterator
over messages received on the socket. This is done by setting the socket
as non-blocking and registering with the async infrastructure when the
socket would block.

This feature will be used by devices that wish to handle messages in an
async fn context.

Change-Id: I47c6e83922068820cd19ffd9ef604ed8a16b755e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1997243
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'msg_socket/Cargo.toml')
-rw-r--r--msg_socket/Cargo.toml3
1 files changed, 3 insertions, 0 deletions
diff --git a/msg_socket/Cargo.toml b/msg_socket/Cargo.toml
index dcfccfc..c803bed 100644
--- a/msg_socket/Cargo.toml
+++ b/msg_socket/Cargo.toml
@@ -5,6 +5,9 @@ authors = ["The Chromium OS Authors"]
 edition = "2018"
 
 [dependencies]
+cros_async = { path = "../cros_async" }
 data_model = { path = "../data_model" }
+futures = "*"
+libc = "*"
 msg_on_socket_derive = { path = "msg_on_socket_derive" }
 sys_util = { path = "../sys_util"  }