aboutsummaryrefslogtreecommitdiff
path: root/clients.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2024-12-08 08:55:37 +0800
committerRunxi Yu <me@runxiyu.org>2024-12-08 08:55:37 +0800
commitad6adae43dd0069889c1b64c21350114b783a055 (patch)
tree65e1464fa3eb30ef1ed6b8016f10f5b0066aa62a /clients.go
parentServer and self awareness (diff)
downloadmeseircd-ad6adae43dd0069889c1b64c21350114b783a055.tar.gz
meseircd-ad6adae43dd0069889c1b64c21350114b783a055.tar.zst
meseircd-ad6adae43dd0069889c1b64c21350114b783a055.zip
Make Client.conn optional
Diffstat (limited to 'clients.go')
-rw-r--r--clients.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/clients.go b/clients.go
index e1b80a6..d142157 100644
--- a/clients.go
+++ b/clients.go
@@ -5,7 +5,7 @@ import (
)
type Client struct {
- conn net.Conn
+ conn *net.Conn
UID [6]byte
Nick string
Ident string
@@ -20,11 +20,11 @@ func (client *Client) Send(msg SMsg) {
// Send failures are not returned; broken connections detected and severed on
// the next receive.
func (client *Client) SendRaw(s string) {
- _, err := client.conn.Write([]byte(s))
+ _, err := (*client.conn).Write([]byte(s))
if err != nil {
// TODO: Should shut down the netFd instead but the stdlib
// doesn't expose a way to do this.
- client.conn.Close()
+ (*client.conn).Close()
}
}