aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-08-06 12:06:42 +0200
committerPřemysl Janouch <p@janouch.name>2018-08-06 12:06:42 +0200
commit62418ebb543caf0da72e9f3a8ec77bc7b978cfa7 (patch)
treeca35163327aff792dcc6d2e7a62e4cc52498eeca
parent6b45865e3dea63ba1851631b1ab8a2817389f1fd (diff)
downloadhaven-62418ebb543caf0da72e9f3a8ec77bc7b978cfa7.tar.gz
haven-62418ebb543caf0da72e9f3a8ec77bc7b978cfa7.tar.xz
haven-62418ebb543caf0da72e9f3a8ec77bc7b978cfa7.zip
hid: rename connCloseWrite to connCloseWriter
-rw-r--r--hid/main.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/hid/main.go b/hid/main.go
index 69978b6..a7bd2e9 100644
--- a/hid/main.go
+++ b/hid/main.go
@@ -563,7 +563,7 @@ func ircIsValidFingerprint(fp string) bool {
// --- Clients (equals users) --------------------------------------------------
-type connCloseWrite interface {
+type connCloseWriter interface {
net.Conn
CloseWrite() error
}
@@ -587,15 +587,15 @@ const (
)
type client struct {
- transport net.Conn // underlying connection
- tls *tls.Conn // TLS, if detected
- conn connCloseWrite // high-level connection
- recvQ []byte // unprocessed input
- sendQ []byte // unprocessed output
- reading bool // whether a reading goroutine is running
- writing bool // whether a writing goroutine is running
- closing bool // whether we're closing the connection
- killTimer *time.Timer // hard kill timeout
+ transport net.Conn // underlying connection
+ tls *tls.Conn // TLS, if detected
+ conn connCloseWriter // high-level connection
+ recvQ []byte // unprocessed input
+ sendQ []byte // unprocessed output
+ reading bool // whether a reading goroutine is running
+ writing bool // whether a writing goroutine is running
+ closing bool // whether we're closing the connection
+ killTimer *time.Timer // hard kill timeout
opened time.Time // when the connection was opened
nSentMessages uint // number of sent messages total
@@ -2853,7 +2853,7 @@ func ircProcessMessage(c *client, msg *message, raw string) {
// Handle the results from initializing the client's connection.
func (c *client) onPrepared(host string, isTLS bool) {
if !isTLS {
- c.conn = c.transport.(connCloseWrite)
+ c.conn = c.transport.(connCloseWriter)
} else if tlsConf != nil {
c.tls = tls.Server(c.transport, tlsConf)
c.conn = c.tls