smux
smux copied to clipboard
A Stream Multiplexing Library for golang with least memory usage(TDMA)
as title, when: 1. MaxReceiveBuffer
修正一处细节,
session.go文件, 搜索 s.notifyWriteError(err) 然后下面添加一行 s.Close() 完整文件: ``` package smux import ( "container/heap" "encoding/binary" "errors" "io" "net" "sync" "sync/atomic" "time" ) const ( defaultAcceptBacklog = 1024 ) var ( ErrInvalidProtocol =...
run test with: `go test -coverprofile=coverage.txt -covermode=atomic -v -run=TestGetDieCh .` in `session_test.go`: ```go func TestGetDieCh(t *testing.T) { cs, ss, err := getSmuxStreamPair() if err != nil { t.Fatal(err) } defer...
``` // internal writeFrame version to support deadline used in keepalive func (s *Session) writeFrameInternal(f Frame, deadline
这个问题我想了很久也没想明白,恳请大侠指点一下。 因为我不相信这个程序这里会有错误。太抓狂了。 ``` // session.go // shaper shapes the sending sequence among streams func (s *Session) shaperLoop() { var reqs shaperHeap var next writeRequest var chWrite chan writeRequest for {...
I'm making proxy and have tcp connections that are just opened but no data is sent. If I enable keepalive, session is closed after 30 sec. Could you add option...
The alloc module of smux is equal to saying that memory only goes up and not down, right?
Stream could conform a little more closely to `net.Conn` by returning a `net.Error` for timeout errors. See: https://golang.org/src/net/net.go?#L113 https://golang.org/src/net/net.go?#L394