Skip to content

A method to get interprocess communication working using websockets in bun for mainly for windows, as bun currently lacks it :/

License

Notifications You must be signed in to change notification settings

Postr-Inc/BUN-IPC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

BUN-IPC

A method to get interprocess communication working using websockets in bun for mainly for windows, as bun currently lacks it :/

#Usage

Client - main file:

import IPC from './IPC.js'
let client = await IPC.client({use: IPC.typeEnums.DFT, port: 3434})
client.set_IPC_Type(1) // change dft tag to the number you want the client/server to respond on
client.Console.read(async(msg) => {
    console.log(msg.data)
})

Server - extern.js file:

import IPC from './IPC.js'
const s = IPC.newServer(IPC.typeEnums.DFT, { port: 3434 })
s.set_IPC_Type(1)
console = s.Console // change console to use s.Console which allows you to send messages to the client

s.close() // instruct to close the server and process

About

A method to get interprocess communication working using websockets in bun for mainly for windows, as bun currently lacks it :/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published