Skip to content

sairash/chitosocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChitoSocket

Less Memory Footprint Socket io

⚠️ Still working on it

Chito → language: Nepali → छिटो → meaning: Fast
Socket → meaning: Web Socket

ChitoSocket is a fast, lightweight WebSockets library with room systems for Go. It can handle millions of connections and uses very little RAM. ChitoSocket is easy to use, and you can write a blazingly fast WebSockets application in less than 10 lines of code. ChitoSocket is built on top of the gobwas/ws library. It is also based on the findings of the article "Million WebSockets and Go" by FreeCodeCamp. ChitoSocket is still under development, you can see the examples in the ChitoSocket Example GitHub repository to learn how to use it.

Example Project


✨Links✨


✨Chitosocket Packages✨

Langauge Package Link
EcmaScript/ JS https://www.npmjs.com/package/@sairash/chitosocket
* New Packages Coming Soon *

Making, Listening and Emiting

Upgrade connection:
conn, readWritter, subscruber, err := chitosocket.UpgradeConnection(c.Request(), c.Response())
Send data to room
 chitosocket.Emit("message", "room", op, data)
Listen to Event from client
chitosocket.On["message"] = func(subs *chitosocket.Subscriber, op ws.OpCode, data map[string]interface{}) {
    chitosocket.Emit("message", "room", op, data)
}

That's it!!

License

MIT