added socket code to the demo app; added more impl to ArrayBuffer