Add a handler for message successfully sent

This commit is contained in:
Robbie Trencheny
2017-01-30 14:14:07 -08:00
parent e39e1207dd
commit 7ba6d478f0
2 changed files with 12 additions and 2 deletions
+3 -1
View File
@@ -2,10 +2,11 @@ package melody
import (
"errors"
"github.com/gorilla/websocket"
"net/http"
"sync"
"time"
"github.com/gorilla/websocket"
)
// Session is wrapper around websocket connections.
@@ -71,6 +72,7 @@ loop:
s.melody.errorHandler(s, err)
break loop
}
s.melody.messageSentHandler(s, msg.msg)
case <-ticker.C:
s.ping()
}