Documentation ¶
Index ¶
- Constants
- func ClientMuxer(conn net.Conn, clientParams *muxedsocket.ClientParams) (muxedsocket.MuxedSocket, error)
- func ServerMuxer(listener net.Listener, params *muxedsocket.ServerParams) (muxedsocket.MuxedListener, error)
- type Conn
- type Listener
- type Stream
- func (s *Stream) Close() error
- func (s *Stream) LocalAddr() net.Addr
- func (s *Stream) Read(b []byte) (n int, err error)
- func (s *Stream) RemoteAddr() net.Addr
- func (s *Stream) SetDeadline(t time.Time) error
- func (s *Stream) SetReadDeadline(t time.Time) error
- func (s *Stream) SetWriteDeadline(t time.Time) error
- func (s *Stream) StreamID() int
- func (s *Stream) Write(b []byte) (n int, err error)
Constants ¶
View Source
const SupportedSMuxVersion = 2
Variables ¶
This section is empty.
Functions ¶
func ClientMuxer ¶
func ClientMuxer(conn net.Conn, clientParams *muxedsocket.ClientParams) (muxedsocket.MuxedSocket, error)
ClientMuxer dials the target server and establishes a connection. If clientParams.TLSConfig is not nil, a TLS layer is added on top of the connection, else not.
func ServerMuxer ¶
func ServerMuxer(listener net.Listener, params *muxedsocket.ServerParams) (muxedsocket.MuxedListener, error)
ServerMuxer takes unencrypted stream-oriented connection-based "listener" and adds TLS and multiplexing. If params.TLSConfig is nil, TLS won't be added.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) AcceptStream ¶
func (c *Conn) AcceptStream() (stream muxedsocket.MuxStream, err error)
func (*Conn) OpenStream ¶
func (c *Conn) OpenStream() (stream muxedsocket.MuxStream, err error)
func (*Conn) RemoteAddr ¶
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) RemoteAddr ¶
Click to show internal directories.
Click to hide internal directories.