mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
20 lines
544 B
JavaScript
20 lines
544 B
JavaScript
function notAvailable(name) {
|
|
return function () {
|
|
throw new Error(`net.${name}() is not available in the web version.`);
|
|
};
|
|
}
|
|
|
|
export const createServer = notAvailable("createServer");
|
|
export const createConnection = notAvailable("createConnection");
|
|
export const connect = notAvailable("connect");
|
|
export class Socket {
|
|
constructor() {
|
|
throw new Error("net.Socket is not available in the web version.");
|
|
}
|
|
}
|
|
export class Server {
|
|
constructor() {
|
|
throw new Error("net.Server is not available in the web version.");
|
|
}
|
|
}
|