mirror of https://github.com/fluffle/goirc
Add field in Conn to allow external state to be propagated to event handlers.
This commit is contained in:
parent
830dbcbb7f
commit
ddd913547c
|
@ -29,6 +29,10 @@ type Conn struct {
|
||||||
// Map of nicks we know about
|
// Map of nicks we know about
|
||||||
nicks map[string]*Nick
|
nicks map[string]*Nick
|
||||||
|
|
||||||
|
// Use the State field to store external state that handlers might need.
|
||||||
|
// Remember ... you might need locking for this ;-)
|
||||||
|
State interface{}
|
||||||
|
|
||||||
// I/O stuff to server
|
// I/O stuff to server
|
||||||
sock net.Conn
|
sock net.Conn
|
||||||
io *bufio.ReadWriter
|
io *bufio.ReadWriter
|
||||||
|
|
Loading…
Reference in New Issue