Socket-call – Call socket.io events like normal JavaScript functions
Hello HN, I built a Typescript library (named socket-call, for lack of a more sexy name) whose goal is to be able to call socket.io events as regular functions. So you declare your server-side like so: ... const listenEvents = (services: UserServices) => ({ // Add your events here, the name of the event is the name of the function login: async (username: string) => { services._socket.data.user = { username }; console.log(`User ${username} logged in`); setInterval(() => { // Calling an event that's handled client-side services.showServerMessage(`You're still logged in…
Socket-call – Call socket.io events like normal JavaScript functions launched on June 16, 2025 with 44 votes, #571 of 7,999 launches that month and more than 90% of that year's launches. The site was still online in September 2026, 1 year on.
In plain words
Socket-call is a TypeScript library that lets developers call Socket.io events as regular JavaScript functions instead of using traditional event emitters. It works by allowing developers to define server-side event handlers as functions and call them from the client using standard async function syntax, eliminating the need for separate event listener and emit patterns. The library is designed for developers building real-time applications with Socket.io who want cleaner, more familiar function-call syntax.
written from the facts on this page · September 2026
From the sources
Contribute to bperel/socket-call development by creating an account on GitHub.
This small library on top of socket.io allows to call events like any regular async Typescript function. import { Server } from "socket.io" ; import { type NamespaceProxyTarget , type ServerSentStartEndEvents , useSocketEvents , } from "socket-call-server" ; const io = new Server ( ) ; user ( io ) ; io . listen ( 3000 ) ; type SessionData = { user ?: { username : string ; } ; } ; type UserServerSentEvents = { showServerMessage : ( message : string ) => void ; } ; const listenEvents = ( services : UserServices ) => ( { // Add your events here, the name of the event is the name of the function login : async ( username : string ) => { services . _socket . data . user = { username } ; console .…from github.com
In the maker’s words, at launch
Hello HN, I built a Typescript library (named socket-call, for lack of a more sexy name) whose goal is to be able to call socket.io events as regular functions. So you declare your server-side like so: ... const listenEvents = (services: UserServices) => ({ // Add your events here, the name of the event is…
Does a similar job
all alternatives →
Socket.js, a tiny WebSockets library for Node.js2016 · github.com · ▲11A realtime communication framework for Node.js. Contribute to stepchowfun/socket.js development by creating an account on GitHub.
- LILog.io (Realtime log monitoring, powered by node.js + socket.io)2011 · logio.org · ▲205
Mengutamakan tampilan modern dan kemudahan navigasi, BUSUR4D menghadirkan pengalaman gaming yang terasa lebih sederhana namun tetap menarik. Beragam pilihan permainan dapat dijelajahi dalam satu platform dengan interface responsif dan desain visual yang nyaman, sehingga aktivitas gaming menjadi lebi
- RSRealtime Server-Sent Events in Go2015 · sse.getgin.io · ▲118
Monitor.io – remote monitoring and debugging for socket.io2014 · drewblaisdell.github.io · ▲51
Socket – Secure your JavaScript supply chain2022 · socket.dev · ▲133Excited to share the project I've been working on for the past 7 months! We've seen nearly weekly attacks against the open source software supply chain. I saw the seeds of this trend start in the mid 2015s as an open source maintainer and I've watched it only get worse over the years. I finally decided to try to solve this problem. Socket is taking an entirely new approach to one of the hardest problems in security in a stagnant part of the industry that has historically been obsessed with just reporting on known vulnerabilities. Unlike other scanning tools, Socket actually analyzes the…
- ALA library to record and intercept JavaScript at runtime2017 · maierfelix.github.io · ▲118
More life & fun this month
the category →
A free city-building game in your browser. You are the mayor. You know what the city needs. Now get it past the zoning board, the neighbors, the appeals court and the next election.
Life & fun · 1d ago · permit.petercai.com
- IV
Life & fun · 13d ago · tanzaniaeducationproject.org

Turn a phone, tablet or TV into a sign. Type a message and it fills the screen: welcome signs, timers, Wi-Fi passwords and more. No app, no account, free.
Life & fun · 14d ago · bigwords.page

Play a free virtual guitar online with your keyboard or by touch. Slow songs down and see every chord, string and strum. Acoustic, classic, electric and bass.
Life & fun · 8d ago · guitoro.com

Carrier settings from iPhone, Pixel and Galaxy firmware, decoded and compared: APNs, VoLTE, 5G and Wi-Fi Calling per carrier, and what each build changed.
Life & fun · 12d ago · carrierexplode.com

Life & fun · 22d ago · space.bl2.net
Source: Show HN post ↗ · launch text quoted in part
Launched alongside, June 2025
the whole month →- IM
Hey HN! Pilots everywhere are required to keep a logbook of all their flying hours, aircraft, airports, and so on. Since I track everything digitally (some people still just use paper logbooks!), I put together some data visualizations and a few 3D globes to show my flying history. This globe is probably my favourite so far: https://jameshard.ing/pilot/globes/all If you’ve got ideas for other graphs or ways to show this kind of data, I’d love to hear them!
Life & fun · 2025 · jameshard.ing

Stunning presentations with AI. No design skills required.
AI · 2025 · chroniclehq.com

Build native mobile apps for iOS and Android without code.
Dev tools · 2025 · bble.io


All your connections, across all your socials.
AI · 2025 · pally.com

I was the main contributor to workout.lol, an open-source fitness app to easily build a workout routine. The project had traction (1.4k GitHub stars, 95 forks, ~20K visits/month), but was eventually sold due to video licensing hurdles. The new owner stopped maintaining it, and the repo went abandoned. Over the next 9 months, I sent 15 emails to try to save it : no replies. Feature requests & issues were ignored. The community was left with a "broken" tool let's say. I couldn't just let it die So I built the new version from scratch with the same open-source spirit, but a better…
Dev tools · 2025 · github.com