From 3c1ef611b331f185ccbb6c75914a6ae04f24a4bd Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Tue, 16 Feb 2016 03:32:23 +0000 Subject: [PATCH 1/3] Fix chrome.sockets.tcp.getSockets It doesn't accept socketId argument, but returns list of all the opened sockets. --- chrome/chrome-app.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/chrome-app.d.ts b/chrome/chrome-app.d.ts index d40fa3b2d7..4a65e4854b 100644 --- a/chrome/chrome-app.d.ts +++ b/chrome/chrome-app.d.ts @@ -258,7 +258,7 @@ declare module chrome.sockets.tcp { export function send(socketId: number, data: ArrayBuffer, callback: (sendInfo: SendInfo) => void): void; export function close(socketId: number, callback?: () => void): void; export function getInfo(socketId: number, callback: (socketInfo: SocketInfo) => void): void; - export function getSockets(socketId: number, callback: (socketInfos: SocketInfo[]) => void): void; + export function getSockets(callback: (socketInfos: SocketInfo[]) => void): void; var onReceive: Event; var onReceiveError: Event; From f4c7df0868bd00bb471c7d3bcca9c25fb9febff6 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Tue, 16 Feb 2016 05:05:24 +0000 Subject: [PATCH 2/3] Update chrome-app-tests.ts --- chrome/chrome-app-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/chrome-app-tests.ts b/chrome/chrome-app-tests.ts index 4665711070..91d888190a 100644 --- a/chrome/chrome-app-tests.ts +++ b/chrome/chrome-app-tests.ts @@ -117,7 +117,7 @@ function test_socketsTcp(): void { chrome.sockets.tcp.getInfo(socketId, (info: chrome.sockets.tcp.SocketInfo) => { }); // getSockets - chrome.sockets.tcp.getSockets(socketId, (infos: chrome.sockets.tcp.SocketInfo[]) => { }); + chrome.sockets.tcp.getSockets((infos: chrome.sockets.tcp.SocketInfo[]) => { }); } function test_socketsTcpEvents(): void { From 78e6c2d4715ab9c64364ae05b4f125877031cfa1 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Tue, 16 Feb 2016 13:04:21 +0000 Subject: [PATCH 3/3] Update chrome-app-tests.ts --- chrome/chrome-app-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/chrome-app-tests.ts b/chrome/chrome-app-tests.ts index 91d888190a..c7194b523b 100644 --- a/chrome/chrome-app-tests.ts +++ b/chrome/chrome-app-tests.ts @@ -283,7 +283,7 @@ function test_socketsTcpServer(): void { chrome.sockets.udp.getInfo(socketId, (info: chrome.sockets.udp.SocketInfo) => { }); // getSockets - chrome.sockets.tcp.getSockets(socketId, (infos: chrome.sockets.tcp.SocketInfo[]) => { }); + chrome.sockets.tcp.getSockets((infos: chrome.sockets.tcp.SocketInfo[]) => { }); } function test_socketsTcpServerEvents(): void {