Skip to content

penlooktmp/socket-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Penlook Socket

Real-time library for Go based on Long-polling

Build Status GoDoc Software License Author

Compatibility

Long-polling request support all major browsers





Roadmap

  • Support Web Socket for HTML5 browser compatibility
  • Implement binary transfer feature
  • Fix bug

Example

Server - Go

import (
	. "github.com/penlook/socket"
)

socket := Socket {
	Port: 3000,
	Token: "acbz@3345123124567",
	Interval: 60,
}

socket.Initialize()

socket.On("connection", func(client Client) {
	client.On("ping", func(data Json) {
		ftm.Println(data); // Ping from client
		client.emit("pong", Json {
			data: "Pong from server"
		})
	})
})

socket.Listen()

Client (Dart - Implementing)

Socket socket = new Socket(3000);

socket.on("ping", (Map data) {
	print(data); // Pong from server
});

socket.emit("ping", {
	"data" : "Ping from client"
})

About

Socket client is written in Dart

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published