Skip to content

baxiry/im

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

im

Instant messaging server, easy to use as a server or as a library

install :

go get -u github.com/baxiry/im

how to use ?

create a websocket on browser and send message as json :

to subscribe to a topic (channel) send :

{
   "event":"subscribe",
   "channel":"my-channel-id"
}

event must be : subscribe, unsubscribe, message,

Later we will add events: reseive, andseen,

to send message to channel/topic:

{
   "event" : "message",
   "channel" : "my-channel-123",
   "data" : "hi frends"
}

then all client subscribe with "my-channel-123" will be receive "hi frinds" message.

How do I create a private connection? between two clients?

Just create a channel and share it between two clients only, this is how you create a private connection

Project status

  • websocket
  • Pubsub
  • cache message
  • 100% Unit testing

License

Use this library with whatever license you prefer.