Comparing version 1.0.5 to 1.0.6
@@ -140,13 +140,16 @@ 'use strict'; | ||
DataWriter = Windows.Storage.Streams.DataWriter; | ||
DataReader = Windows.Storage.Streams.DataReader; | ||
StreamSocketListener = Windows.Networking.Sockets.StreamSocketListener; | ||
StreamSocket = Windows.Networking.Sockets.StreamSocket; | ||
if (typeof Windows != 'undefined') { | ||
DataWriter = Windows.Storage.Streams.DataWriter; | ||
DataReader = Windows.Storage.Streams.DataReader; | ||
StreamSocketListener = Windows.Networking.Sockets.StreamSocketListener; | ||
StreamSocket = Windows.Networking.Sockets.StreamSocket; | ||
} | ||
/////////////////////////////////////////////////////////////////////// | ||
/////////////////////////// SOCKET //////////////////////////////////// | ||
/////////////////////////////////////////////////////////////////////// | ||
_export('Socket', Socket = function (_Duplex) { | ||
_inherits(Socket, _Duplex); | ||
// 35536 is max size of data the chunk could read from stream at once | ||
// (it's not just a random value. Was measured with Node.js) | ||
function Socket(options) { | ||
@@ -153,0 +156,0 @@ var _ret; |
@@ -32,6 +32,12 @@ 'use strict'; | ||
var DataWriter = Windows.Storage.Streams.DataWriter; | ||
var DataReader = Windows.Storage.Streams.DataReader; | ||
var StreamSocketListener = Windows.Networking.Sockets.StreamSocketListener; | ||
var StreamSocket = Windows.Networking.Sockets.StreamSocket; | ||
// JSPM will execute this module even when in not WinRT enviroment | ||
// which causes troubles with flexus-net module running in Chrome Apps. | ||
// Wrapped for interacting with WinRT APIs onlny in WinRT. | ||
var DataWriter, DataReader, StreamSocketListener, StreamSocket; | ||
if (typeof Windows != 'undefined') { | ||
DataWriter = Windows.Storage.Streams.DataWriter; | ||
DataReader = Windows.Storage.Streams.DataReader; | ||
StreamSocketListener = Windows.Networking.Sockets.StreamSocketListener; | ||
StreamSocket = Windows.Networking.Sockets.StreamSocket; | ||
} | ||
@@ -45,5 +51,2 @@ /////////////////////////////////////////////////////////////////////// | ||
// 35536 is max size of data the chunk could read from stream at once | ||
// (it's not just a random value. Was measured with Node.js) | ||
function Socket(options) { | ||
@@ -50,0 +53,0 @@ var _ret; |
{ | ||
"name": "winrt-net", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "WinRT (Windows App) wrapper for node net module", | ||
@@ -5,0 +5,0 @@ "author": "Mike Kovařík <kenr.mk@gmail.com>", |
@@ -14,3 +14,3 @@ # winrt-net | ||
#### Why? | ||
JSPM has it's own module that gets installed whenever you or your dependecy uses `net` module. And it does next to nothing because browsers don't do TCP. | ||
JSPM has its own module that gets installed whenever you or your dependecy uses `net` module. And it does next to nothing because browsers don't do TCP. | ||
#### how? | ||
@@ -17,0 +17,0 @@ In JSPM config file there is property `map` with names and mappings of all modules. This is an example of JSPM 0.17 `jspm.config.js` |
@@ -7,9 +7,14 @@ import {EventEmitter} from 'events'; | ||
var DataWriter = Windows.Storage.Streams.DataWriter; | ||
var DataReader = Windows.Storage.Streams.DataReader; | ||
var StreamSocketListener = Windows.Networking.Sockets.StreamSocketListener; | ||
var StreamSocket = Windows.Networking.Sockets.StreamSocket; | ||
// JSPM will execute this module even when in not WinRT enviroment | ||
// which causes troubles with flexus-net module running in Chrome Apps. | ||
// Wrapped for interacting with WinRT APIs onlny in WinRT. | ||
var DataWriter, DataReader, StreamSocketListener, StreamSocket; | ||
if (typeof Windows != 'undefined') { | ||
DataWriter = Windows.Storage.Streams.DataWriter; | ||
DataReader = Windows.Storage.Streams.DataReader; | ||
StreamSocketListener = Windows.Networking.Sockets.StreamSocketListener; | ||
StreamSocket = Windows.Networking.Sockets.StreamSocket; | ||
} | ||
/////////////////////////////////////////////////////////////////////// | ||
@@ -16,0 +21,0 @@ /////////////////////////// SOCKET //////////////////////////////////// |
671063
11119