Documentation ¶
Index ¶
- Constants
- func Dial(pConn net.PacketConn, tlsConfig *tls.Config, ...) (muxedsocket.MuxedSocket, error)
- func Listen(packetConn net.PacketConn, tlsConfig *tls.Config, ...) (muxedsocket.MuxedListener, error)
- type Conn
- func (c *Conn) AcceptStream() (stream muxedsocket.MuxStream, err error)
- func (c *Conn) Close() error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) OpenStream() (stream muxedsocket.MuxStream, err error)
- func (c *Conn) ReceiveDatagram() ([]byte, error)
- func (c *Conn) RemoteAddr() net.Addr
- func (c *Conn) SendDatagram(b []byte) error
- 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 GracefulCloseCode Q.ApplicationErrorCode = 0x2
View Source
const GracefulCloseString string = "graceful close"
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
func Dial(pConn net.PacketConn, tlsConfig *tls.Config, clientParams *muxedsocket.ClientParams) (muxedsocket.MuxedSocket, error)
Dial dials the target server and establishes a connection.
func Listen ¶
func Listen(packetConn net.PacketConn, tlsConfig *tls.Config, params *muxedsocket.ServerParams) (muxedsocket.MuxedListener, error)
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) ReceiveDatagram ¶
func (*Conn) RemoteAddr ¶
func (*Conn) SendDatagram ¶
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) RemoteAddr ¶
Click to show internal directories.
Click to hide internal directories.