mirror of https://github.com/tidwall/redcon.git
exposed base net.Conn to interface
This commit is contained in:
parent
6f1afba017
commit
8b15dea700
|
@ -88,6 +88,8 @@ type Conn interface {
|
|||
// PeekPipeline returns all commands in current pipeline, if any.
|
||||
// The commands remain in the pipeline.
|
||||
PeekPipeline() []Command
|
||||
// NetConn returns the base net.Conn connection
|
||||
NetConn() net.Conn
|
||||
}
|
||||
|
||||
// NewServer returns a new Redcon server configured on "tcp" network net.
|
||||
|
@ -309,6 +311,9 @@ func (c *conn) ReadPipeline() []Command {
|
|||
func (c *conn) PeekPipeline() []Command {
|
||||
return c.cmds
|
||||
}
|
||||
func (c *conn) NetConn() net.Conn {
|
||||
return c.conn
|
||||
}
|
||||
|
||||
// BaseWriter returns the underlying connection writer, if any
|
||||
func BaseWriter(c Conn) *Writer {
|
||||
|
|
Loading…
Reference in New Issue