declare _state, _address, _port
This commit is contained in:
parent
9f20638b8f
commit
9732f320a4
|
@ -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
|
Loading…
Reference in New Issue