From 9732f320a4f4733f6db20a58c71937681de30ad2 Mon Sep 17 00:00:00 2001 From: Mark Vayngrib Date: Sun, 10 May 2015 10:49:02 -0400 Subject: [PATCH] declare _state, _address, _port --- UdpSocket.ios.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/UdpSocket.ios.js b/UdpSocket.ios.js index d15dabd..77fdaa3 100644 --- a/UdpSocket.ios.js +++ b/UdpSocket.ios.js @@ -31,12 +31,9 @@ var STATE = { class RCTSocket extends Component { id: String; - - _state: STATE.UNBOUND; - - _address: undefined; - - _port: undefined; + _state: Integer; + _address: String; + _port: Integer; constructor(props) { super(props) @@ -48,6 +45,7 @@ class RCTSocket extends Component { // ensure compatibility with node's EventEmitter if (!this.on) this.on = this.addListener.bind(this) + this._state = STATE.UNBOUND sockets.createSocket(this.id, { type: props.type || 'udp4' }) // later @@ -259,4 +257,5 @@ function toByteArray(obj) { return new Uint8Array(uint); } + module.exports = RCTSocket \ No newline at end of file