title: Measure Size of Data Sent over Socket
body: <p>I was thinking about how you would read how much data you send over a Socket. For example if I made a Chat Application and then wanted to find out how much a message would take (in kilobytes or bytes), how would I measure this?</p>
  
  <p>I send a message like "Hello, world!". How do I measure the amount of bandwidth that would take to send?</p>
  
  <p>I know there are programs to monitor how much data is sent and received over the wire and all that, but I wanted to try and do this myself to learn some.</p>