# Socket and fdMonitor

**URL:** <https://forum.legato.io/t/socket-and-fdmonitor/2603>\
**Category:** Legato Application Framework\
**Created:** [August 14, 2017, 10:39am UTC](https://forum.legato.io/t/socket-and-fdmonitor/2603 "2017-08-14T10:39:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://forum.legato.io/u/davidc)\
**Post date:** [August 14, 2017, 10:39am UTC](https://forum.legato.io/t/socket-and-fdmonitor/2603/1 "2017-08-14T10:39:26Z")

</div>

Hiya,

When using a fdMonitor handler to monitor a socket, how do you tell the difference between a socket accept() (i.e. new client has connected to the server) and read() data available?

According to the doco (and my experimentation!), both events are indicated with a POLLIN event being sent to the FD handler.

ciao, Dave

---

<div class="post-metadata">

**Author:** ![pinkesh](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/pinkesh/32/221_2.png) [@pinkesh](https://forum.legato.io/u/pinkesh)\
**Post date:** [December 18, 2017, 9:25am UTC](https://forum.legato.io/t/socket-and-fdmonitor/2603/2 "2017-12-18T09:25:49Z")

</div>

Yes, your understanding is right. Socket accept() and file read() both are triggered with POLLIN event for fdMonitor Handler.
