title: use sockets with ionic2
body: <p>I need to be able to use udp or tcp sockets on an ionic2 app. I tried using the 'dgram' module that comes with node.js, I can import it  but as soon as I try to use it in my class and do ionic serve I see these errors:
  Example: 
  This line alone in my class is fine after "ionic serve"</p>
  
  <p><code>import dgram  from 'dgram';</code></p>
  
  <p>but as soon as I try to use use, like:</p>
  
  <p><code>let server = dgram.createSocket('udp4');</code> </p>
  
  <p>and run "ionic serve" I see these errors on the browser:</p>
  
  <p><code>Cannot find module "dgram</code></p>
  
  <pre><code>Error: Cannot find module "dgram"
  at webpackMissingModule (http://localhost:8100/build/main.js:60926:79)
  at Object.&lt;anonymous&gt; (http://localhost:8100/build/main.js:60926:161)
  at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
  at Object.&lt;anonymous&gt; (http://localhost:8100/build/main.js:103698:14)
  at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
  at Object.&lt;anonymous&gt; (http://localhost:8100/build/main.js:92433:23)
  at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
  at Object.&lt;anonymous&gt; (http://localhost:8100/build/main.js:118153:20)
  at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
  at http://localhost:8100/build/main.js:66:18
  </code></pre>
  
  <p>After some googling it seems that I can not proceed that way because that is considered 'server-side' code.</p>
  
  <p>Has anybody been able to add that sort of functionality on an ionic2 app?
  Any help is greatly appreciated!</p>