Skip to content

tenntenn/netchan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netchan

An implementation of netchan using websocket and messagepack.

API document is here.

Send

ch := make(chan int)
done := make(chan bool)
select {
	case err := <-netchan.Dial(&ch, done, ":9090", ":8080", "Test"):
		fmt.Println(err.Error())
	case ch <- 100:
		<-done
}

Recieve

ch := make(chan int)
select {
	case err := <-netchan.Dial(&ch, nil, ":8080", ":9090", "Test"):
		fmt.Println(err.Error())
	case n := <-ch:
		fmt.Println(n)
}

About

implementation netchan using websocket and msgpack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages