{"id":"thelightsaberthatisblue-cell/ports","name":"ports","scope":"thelightsaberthatisblue-cell","platform":"roblox","description":"Mirrored from the Wally registry.","version":"0.4.1","latest":"0.4.1","versions":["0.1.0","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.9","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.2.8","0.2.9","0.3.0","0.4.0","0.4.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{},"integrity":"241ac1d166bf0cb7f52e4ba9080fe150e813ffc4f9c98c553ffb5a729caecb4f","likes":0,"downloads":0,"install":"forest install thelightsaberthatisblue-cell/ports","url":"https://forest.dev/p/roblox/thelightsaberthatisblue-cell/ports","files":"https://api.forest.dev/ai/package/roblox/thelightsaberthatisblue-cell/ports/files","readme":"# Ports\r\n\r\nPorts is a lightweight Roblox networking library that simplifies RemoteEvent usage  \r\nby simulating a port-based messaging system. Instead of creating many RemoteEvents,  \r\nPorts uses two channels (reliable and unreliable) and routes all communication using  \r\nsimple port numbers.\r\n\r\nIn normal Roblox development, you typically create multiple RemoteEvents, organize  \r\nthem in ReplicatedStorage, and repeat similar boilerplate for each one. Ports replaces  \r\nthat with a single structured system that behaves like a signal-style event router  \r\nbuilt on top of RemoteEvents.\r\n\r\nReliable communication is intended for important gameplay events where delivery must  \r\nbe guaranteed, while unreliable communication is faster but may drop messages and is  \r\nmeant for non-critical updates such as visual effects or smooth movement syncing.\r\n\r\nPorts works by sending a portnumber through the network, and listeners react only to  \r\nthe ports they are registered for. This allows many logical communication channels  \r\nwithout creating additional RemoteEvents.\r\n\r\nOn the client, Ports can listen for server messages or send data back to the server.  \r\nOn the server, it can receive client messages, send data to specific players, or  \r\nbroadcast to all clients using the same routing system.\r\n\r\nThe entire system is designed to reduce ReplicatedStorage clutter while keeping  \r\ncommunication structured, predictable, and easy to manage. Module state exists only  \r\nwithin the same server or client environment and does not replicate across servers.\r\n\r\nOverall, Ports provides a clean, signal-like API over Roblox RemoteEvents using a  \r\nsimple and scalable port-based routing approach.\r\n\r\n---\r\n\r\n# Function Reference\r\n\r\nPorts.SendToServer  \r\nSends a message from the client to the server using a specific port number.  \r\nUsed when the client needs to request or trigger something on the server.\r\n\r\nPorts.ListenForClient  \r\nListens on the server for a specific port from a client.  \r\nAutomatically disconnects after the first matching message is received.  \r\nUseful for one-time requests or actions.\r\n\r\nPorts.ListenOnServer  \r\nContinuously listens on the server for a specific port from clients.  \r\nDoes not disconnect automatically and keeps reacting to matching messages.  \r\nUseful for persistent server-side event handling.\r\n\r\nPorts.SendToClient  \r\nSends a message from the server to a specific player using a port number.  \r\nUsed for targeted communication such as UI updates or player-specific events.\r\n\r\nPorts.Broadcast  \r\nSends a message from the server to all connected clients using a port number.  \r\nUseful for global events like round starts, effects, or announcements.\r\n\r\nPorts.ListenForServer  \r\nListens on the client for a specific port from the server.  \r\nAutomatically disconnects after the first matching message is received.  \r\nUsed for one-time server responses.\r\n\r\nPorts.ListenOnClient  \r\nContinuously listens on the client for server messages using a port number.  \r\nDoes not disconnect automatically and handles repeated events over time.  \r\nUsed for ongoing client-side updates.\r\n\r\nPorts.UnreliablySendToServer  \r\nSame as SendToServer but uses the unreliable channel.  \r\nFaster but not guaranteed to arrive. Used for non-critical data.\r\n\r\nPorts.UnreliablyListenForClient  \r\nOne-time server listener using the unreliable channel.  \r\nDisconnects after first matching message.\r\n\r\nPorts.UnreliablyListenOnServer  \r\nPersistent server listener using the unreliable channel.  \r\nHandles repeated non-critical client messages.\r\n\r\nPorts.UnreliablySendToClient  \r\nSends a message from server to a client using the unreliable channel.  \r\nUsed for fast updates where occasional loss is acceptable.\r\n\r\nPorts.UnreliablyBroadcast  \r\nBroadcasts a message to all clients using the unreliable channel.  \r\nUsed for frequent or non-critical global updates.\r\n\r\nPorts.UnreliablyListenForServer  \r\nOne-time client listener for unreliable server messages.  \r\nDisconnects after first match.\r\n\r\nPorts.UnreliablyListenOnClient  \r\nPersistent client listener for unreliable server messages.  \r\nUsed for continuous non-critical updates from the server.\r\n","readmeTruncated":false}