Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (15 sloc) 329 Bytes
package bully
import (
"encoding/gob"
"io"
)
// Peer is a `struct` representing a remote `bully.Bully`.
type Peer struct {
ID string
addr string
sock *gob.Encoder
}
// NewPeer returns a new `*bully.Peer`.
func NewPeer(ID, addr string, fd io.Writer) *Peer {
return &Peer{ID: ID, addr: addr, sock: gob.NewEncoder(fd)}
}
You can’t perform that action at this time.