declare _state, _address, _port

This commit is contained in:
Mark Vayngrib 2015-05-10 10:49:02 -04:00
parent 9f20638b8f
commit 9732f320a4
1 changed files with 5 additions and 6 deletions

View File

@ -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