[#Sock-EventsPerSock]
= xref:Sock.adoc[Sock]::EventsPerSock
:relfileprefix: ../
:mrdocs:

On which socket to wait for what events in `WaitMany()`&period; The `shared&lowbar;ptr` is copied into the map to ensure that the `Sock` object is not destroyed (its destructor would close the underlying socket)&period; If this happens shortly before or after we call `poll(2)` and a new socket gets created under the same file descriptor number then the report from `WaitMany()` will be bogus&period;

== Synopsis

Declared in `&lt;util&sol;sock&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
using EventsPerSock = std::unordered&lowbar;map&lt;std::shared&lowbar;ptr&lt;Sock const&gt;, Events, HashSharedPtrSock, EqualSharedPtrSock&gt;;
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
