# How to read from socket in non-blocking mode

**URL:** <https://discourse.julialang.org/t/how-to-read-from-socket-in-non-blocking-mode/4710>\
**Category:** New to Julia\
**Created:** [July 7, 2017, 8:30am UTC](https://discourse.julialang.org/t/how-to-read-from-socket-in-non-blocking-mode/4710 "2017-07-07T08:30:11Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Keno](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/keno/32/285_2.png) [@Keno](https://discourse.julialang.org/u/Keno)\
**Post date:** [July 7, 2017, 9:16am UTC](https://discourse.julialang.org/t/how-to-read-from-socket-in-non-blocking-mode/4710/3 "2017-07-07T09:16:44Z")

</div>

All I/O in julia is non-blocking in the traditional sense of the word, because we don’t block threads on I/O activity. However, we do use tasks to simulate blocking I/O for ease of programming. The `nb_available` function isn’t super meaningful for sockets. It tells you how many bytes are available in the userspace buffer. It says nothing about now many bytes are available in the kernel, in various buffers along the network path or are in transit.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-read-from-socket-in-non-blocking-mode/4710)._
