~samwhited/xmpp

58a217762b64966fd8cdfd1c7db8dc192cdc5d0d — Sam Whited 4 years ago 5cac0e8
Add a `Raw() io.ReadWriteCloser' method to Conn
1 files changed, 5 insertions(+), 0 deletions(-)

M conn.go
M conn.go => conn.go +5 -0
@@ 76,6 76,11 @@ func NewConn(ctx context.Context, config *Config, rwc io.ReadWriteCloser) (*Conn
	return c, c.negotiateStreams(ctx)
}

// Raw returns the Conn's backing net.Conn or other ReadWriteCloser.
func (c *Conn) Raw() io.ReadWriteCloser {
	return c.rwc
}

// Config returns the connections config.
func (c *Conn) Config() *Config {
	return c.config