ruby-operator">::</span><span class="ruby-constant">Writer</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">output_socket</span>
<span class="ruby-keyword">begin</span>
  <span class="ruby-identifier">bytes_written</span> = <span class="ruby-identifier">writer</span>.<span class="ruby-identifier">write_nonblock</span> <span class="ruby-string">&quot;sample string&quot;</span>
  <span class="ruby-comment"># handle &quot;bytes_written&quot;</span>
<span class="ruby-keyword">rescue