Normally Pleasant Mixture

    @rbxts/abstractify
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.5 • Public • Published

    abstractify

    Roblox networking similar to many event based systems found in TypeScript and JavaScript. Slightly based off of Electron and their implementation of IPC.

    Example

    // SERVER
    import { ipcServer } from '@rbxts/abstractify'
    import { Players } from '@rbxts/services'
    
    print('Hello, world! This message is from the server!')
    
    ipcServer.on('test_message', (player, msg) => {
      print(`${player.DisplayName} has sent a message: ${msg}`)
    })
    
    Players.PlayerAdded.Connect((player) => {
      ipcServer.emit('test_message', 'Welcome to this server!')
      ipcServer.broadcast('test_message', `${player.DisplayName} has joined the server!`)
    })
    // CLIENT
    import { ipcClient } from '@rbxts/abstractify'
    
    ipcClient.on('test_message', (msg) => {
      print(`Server sent a message: ${msg}`)
    })
    
    ipcClient.emit('test_message', 'Hi, server!')

    Keywords

    none

    Install

    npm i @rbxts/abstractify

    DownloadsWeekly Downloads

    4

    Version

    1.1.5

    License

    ISC

    Unpacked Size

    16.8 kB

    Total Files

    11

    Last publish

    Collaborators

    • alotofletters