diff options
author | 2021-10-14 13:24:58 +0200 | |
---|---|---|
committer | 2021-10-14 13:24:58 +0200 | |
commit | fe1ba2ad6affeb6c0e97c73171d8fa3f31dde73e (patch) | |
tree | 10caa332d957421e982c7ddd0c94623d5d62314d /src/electron/ipc-api/localServer.ts | |
parent | chore: convert various JS to TS (#2062) (diff) | |
download | ferdium-app-fe1ba2ad6affeb6c0e97c73171d8fa3f31dde73e.tar.gz ferdium-app-fe1ba2ad6affeb6c0e97c73171d8fa3f31dde73e.tar.zst ferdium-app-fe1ba2ad6affeb6c0e97c73171d8fa3f31dde73e.zip |
chore: convert files to TS (#2066)
Diffstat (limited to 'src/electron/ipc-api/localServer.ts')
-rw-r--r-- | src/electron/ipc-api/localServer.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/electron/ipc-api/localServer.ts b/src/electron/ipc-api/localServer.ts index 7ee642101..04ddc976a 100644 --- a/src/electron/ipc-api/localServer.ts +++ b/src/electron/ipc-api/localServer.ts | |||
@@ -1,12 +1,12 @@ | |||
1 | import { ipcMain, BrowserWindow } from 'electron'; | 1 | import { ipcMain, BrowserWindow } from 'electron'; |
2 | import net from 'net'; | 2 | import { createServer } from 'net'; |
3 | import { LOCAL_HOSTNAME, LOCAL_PORT } from '../../config'; | 3 | import { LOCAL_HOSTNAME, LOCAL_PORT } from '../../config'; |
4 | import { userDataPath } from '../../environment-remote'; | 4 | import { userDataPath } from '../../environment-remote'; |
5 | import { server } from '../../internal-server/start'; | 5 | import { server } from '../../internal-server/start'; |
6 | 6 | ||
7 | const portInUse = (port: number): Promise<boolean> => | 7 | const portInUse = (port: number): Promise<boolean> => |
8 | new Promise(resolve => { | 8 | new Promise(resolve => { |
9 | const server = net.createServer(socket => { | 9 | const server = createServer(socket => { |
10 | socket.write('Echo server\r\n'); | 10 | socket.write('Echo server\r\n'); |
11 | socket.pipe(socket); | 11 | socket.pipe(socket); |
12 | }); | 12 | }); |