fdom.apis.set("core", {
  'createChannel': {type: "method", value: []},
  'bindChannel': {type: "method", value: ["proxy"]}
});

fdom.apis.set("core.view", {
  'open': {type: "method", value: [{
    'file':"string",
    'code':"string"
  }]},
  'show': {type: "method", value: []},
  'close': {type: "method", value: []},
  'postMessage': {type: "method", value: ["object"]},

  'message': {type: "event", value: "object"},
  'onClose': {type: "event", value: []}
});

fdom.apis.set("core.storage", {
  'set': {type: "method", value: ["string", "string"]},
  'get': {type: "method", value: ["string"]},
  'change': {type: "event", value: ["string"]}
});

fdom.apis.set("core.peerconnection", {
  'open': {type: "method", value: ["proxy"]},
  'postMessage': {type: "method", value: [{"text": "string", "binary": "blob", "buffer": "buffer"}]},
  'message': {type: "event", value: {"text": "string", "binary": "blob", "buffer": "buffer"}},

  'close': {type: "method", value: []},
  'onClose': {type: "event", value: []}
});

fdom.apis.set("core.socket", {
  'create': {type: "method", value: ["string", "object"]},
  'connect': {type: "method", value: ["number", "string", "number"]},
  'onData': {type: "event", value: ["string"]},
  'write': {type: "method", value: ["number", "buffer"]},
  'disconnect': {type: "method", value: ["number"]},
  'destroy': {type: "method", value: ["number"]},
  'listen': {type: "method", value: ["number", "string", "number"]},
  'onConnection': {type: "event", value: ["number"]},
  'getInfo': {type: "method", value: ["number"]}
});

@@ -1243,33 +1243,59 @@
 nt%22, value: 
-%5B
+%7BsocketId: %22number%22, data: 
 %22string%22
 %5D%7D,%0D%0A  'writ
@@ -1278,25 +1278,25 @@
 ta: %22string%22
-%5D
+%7D
 %7D,%0D%0A  'write
@@ -1558,33 +1558,32 @@
 nt%22, value: 
-%5B
 %22number%22
 %5D%7D,%0D%0A  'getI
@@ -1566,25 +1566,24 @@
 ue: %22number%22
-%5D
 %7D,%0D%0A  'getIn

Change return types of onData and OnConnection events.