mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-01-09 01:59:20 -08:00
Transports need to handle open/close stanzas
XMPP and WebSocket transports require different open and close stanzas. To handle this the responsibility handling those and creating the XML decoder is moved to the Transport.
This commit is contained in:
committed by
Mickaël Rémond
parent
25fd476328
commit
92329b48e6
@@ -2,17 +2,16 @@ package xmpp
|
||||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Mediated Read / Write on socket
|
||||
// Used if logFile from Config is not nil
|
||||
type streamLogger struct {
|
||||
socket io.ReadWriter // Actual connection
|
||||
logFile *os.File
|
||||
logFile io.Writer
|
||||
}
|
||||
|
||||
func newStreamLogger(conn io.ReadWriter, logFile *os.File) io.ReadWriter {
|
||||
func newStreamLogger(conn io.ReadWriter, logFile io.Writer) io.ReadWriter {
|
||||
if logFile == nil {
|
||||
return conn
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user