diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-10-17 16:49:27 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-10-17 16:49:27 +0200 |
commit | cb25a9585d87d8dd13d9eae66fd232e3dfdc8fac (patch) | |
tree | 386032c94090b61ec2be78c57f7ab68810d84a4c /udev/lib/libudev-monitor.c | |
parent | d960ad1546548d4b7aaf35e8b8f2cef652449ee7 (diff) |
libudev: monitor - add set_receive_buffer_size()
Diffstat (limited to 'udev/lib/libudev-monitor.c')
-rw-r--r-- | udev/lib/libudev-monitor.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/udev/lib/libudev-monitor.c b/udev/lib/libudev-monitor.c index d0f28849aa..6c6f4aa7e0 100644 --- a/udev/lib/libudev-monitor.c +++ b/udev/lib/libudev-monitor.c @@ -152,6 +152,13 @@ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor) return 0; } +int udev_monitor_set_receive_buffer_size(struct udev_monitor *udev_monitor, int size) +{ + if (udev_monitor == NULL) + return -1; + return setsockopt(udev_monitor->sock, SOL_SOCKET, SO_RCVBUFFORCE, &size, sizeof(size)); +} + /** * udev_monitor_ref: * @udev_monitor: udev monitor |