mirror of
https://github.com/xtaci/smux.git
synced 2024-04-21 10:51:48 +00:00
34 lines
522 B
Go
34 lines
522 B
Go
package smux
|
|
|
|
const (
|
|
STREAM_IDLE = 1 << iota
|
|
STREAM_NEW
|
|
STREAM_ESTABLISHED
|
|
STREAM_CLOSED
|
|
)
|
|
|
|
// Stream implements io.ReadWriteCloser
|
|
type Stream struct {
|
|
state int
|
|
rxQueue []*Frame // receive queue
|
|
config *Config
|
|
}
|
|
|
|
func newStream(config *Config) *Stream {
|
|
stream := new(Stream)
|
|
stream.config = config
|
|
return stream
|
|
}
|
|
|
|
func (s *Stream) Read(b []byte) (n int, err error) {
|
|
return 0, nil
|
|
}
|
|
|
|
func (s *Stream) Write(b []byte) (n int, err error) {
|
|
return 0, nil
|
|
}
|
|
|
|
func (s *Stream) Close() error {
|
|
return nil
|
|
}
|