fix: socket options

This commit is contained in:
SamuelScheit
2023-05-12 18:02:41 +02:00
parent 6ab9ca5714
commit 6ecc5a8757
4 changed files with 14 additions and 15 deletions
+5 -2
View File
@@ -12,7 +12,10 @@ export class MobileSocket extends Socket {
}
override connect() {
return super.connect(MOBILE_PORT, MOBILE_ENDPOINT, () => {
return super.connect({
host: MOBILE_ENDPOINT,
port: MOBILE_PORT,
}, () => {
this.emit('open')
})
}
@@ -38,6 +41,6 @@ export class MobileSocket extends Socket {
}
send(data: unknown, cb?: ((err?: Error | undefined) => void) | undefined) {
return super.write(data as Uint8Array | string, cb as ((err?: Error | undefined) => void))
return super.write(data as Uint8Array | string, undefined, cb as ((err?: Error | undefined) => void))
}
}