title: How to know TCP connection is closed in net package?
body: <p>I'm implementing a small TCP server. How do I know if one of my clients closed? Should I just try to read or write and check if <code>err</code> is nil?</p>