iosignal 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iosignal",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "iosignal",
5
5
  "type": "module",
6
6
  "main": "./dist/iosignal.cjs",
@@ -947,8 +947,8 @@ export class IOCore extends EventEmitter{
947
947
 
948
948
  if( this.stateName !== eventName ){
949
949
  // console.log(`state: ${this.stateName} => ${eventName}` )
950
- this.emit('change', eventName)
951
950
  this.stateName = eventName
951
+ this.emit('change', eventName)
952
952
  }
953
953
  }
954
954
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  const { IO } = require('iosignal')
3
3
 
4
- const io = new IO('wss://io.remocon.kr/ws')
4
+ const io = new IO('ws://localhost:7777')
5
5
 
6
6
  io.on('ready', ()=>{
7
7
  console.log('ready cid:', io.cid)
@@ -1,7 +1,7 @@
1
1
 
2
2
  import { IO } from "iosignal"
3
3
 
4
- const io = new IO('wss://io.remocon.kr/ws')
4
+ const io = new IO('ws://localhost:7777')
5
5
 
6
6
  io.on('ready', ()=>{
7
7
  console.log('ready cid:', io.cid)
@@ -0,0 +1,19 @@
1
+
2
+ import { IO } from "iosignal"
3
+
4
+ const io = new IO('ws://localhost:7777')
5
+
6
+ io.on('ready', ()=>{
7
+ console.log('ready cid:', io.cid)
8
+ });
9
+
10
+ io.on('change', ( evt )=>{
11
+ console.log('change event:', evt )
12
+ console.log('io.state<Number>', io.state )
13
+ console.log('io.stateName<String>:', io.stateName )
14
+ });
15
+
16
+
17
+ io.on('error',err=>{
18
+ console.log('err', err)
19
+ })