guoguangwu
fe94a653db
chore: use bytes.Equal instead
2023-10-19 21:33:32 +08:00
xtaci
79ed6364e6
differentiate control frame and data frame
2023-02-14 22:19:42 +08:00
xtaci
e7525af09e
remove poller API
2020-01-16 22:07:10 +08:00
xtaci
211bc4a98c
fix spelling
2020-01-04 00:23:22 +08:00
xtaci
fe8b9a2233
Squashed commit of the following:
...
commit 4d53a564a987a171d9cc563ee73e92c7faa3624a
Author: xtaci <daniel820313@gmail.com >
Date: Sat Dec 28 22:14:17 2019 +0800
add function PeekSize
commit 9ca9c83c3f06aca7ceef161f39adce12de2d1ec5
Author: xtaci <daniel820313@gmail.com >
Date: Sat Dec 28 21:53:41 2019 +0800
add Peak
2019-12-28 22:16:15 +08:00
xtaci
a8a5f9cbbe
test WriteTo v2
2019-12-26 21:25:25 +08:00
xtaci
3ab6b40f74
add tests to ver2
2019-12-26 21:16:53 +08:00
xtaci
f182401f19
merge protocol version 2 in master
2019-12-26 17:25:11 +08:00
xtaci
fe34c960fb
Revert "config protocol Version in Config"
...
This reverts commit 9f184cedda .
2019-12-26 13:39:01 +08:00
xtaci
9f184cedda
config protocol Version in Config
2019-12-26 12:30:53 +08:00
xtaci
634a18c835
fix tests
2019-12-26 12:14:00 +08:00
xtaci
f386d90508
Squashed commit of the following:
...
commit 486431f53deb10b0e6ee51b47785f6f06f0d5733
Author: xtaci <daniel820313@gmail.com >
Date: Thu Dec 26 12:02:52 2019 +0800
remove in-package pkg/errors
commit 213597603a726735678024ec6051800c46ed0bd0
Author: xtaci <daniel820313@gmail.com >
Date: Thu Dec 26 11:58:36 2019 +0800
fix poll
commit d1f7aeefbeb40da99d47ba2b7db5bd403c09ddba
Author: xtaci <daniel820313@gmail.com >
Date: Thu Dec 26 11:17:28 2019 +0800
fix error
commit 152918f9b531c06b42c764f0aff35d4bb9315713
Author: xtaci <daniel820313@gmail.com >
Date: Wed Dec 25 23:27:18 2019 +0800
poll for v1
2019-12-26 12:06:21 +08:00
xtaci
c913b2d39b
add stream.WriteTo method
2019-11-26 21:17:12 +08:00
xtaci
78fdaa98a6
add a shaper for fair transfer
2019-09-10 20:33:49 +08:00
xtaci
6aa95ef6b7
fix incorrect error reporting in tests https://github.com/xtaci/smux/issues/54
2019-08-28 11:41:48 +08:00
xtaci
febb4a5f0d
add TestSessionDoubleClose
2019-05-13 21:45:23 +08:00
xtaci
2c8add414c
proper error handling
2019-05-13 21:33:06 +08:00
xtaci
3752dae3e1
proper error handling in smux
2019-05-10 14:24:45 +08:00
jannson
0bafab3e44
use writeFrameInternal instead of writeFrameWithDeadline
2019-02-12 23:58:45 +08:00
jannson
d7d8337fbf
all cover for writeFrameWithDeadline
2019-02-12 21:48:52 +08:00
janson
2c51c16a69
do better coverage
2019-02-12 19:00:43 +08:00
janson
2775ecb3f8
add TestKeepAliveBlockWriteTimeout and TestDeadlineFrame
2019-02-12 14:31:33 +08:00
auxten
9a596215cd
Fix forget to close server session
2018-12-05 11:34:04 +08:00
auxten
adfc81dd78
Add Stream.GetDieCh which returns a readonly chan to get notified when the stream is to be closed
2018-12-05 11:24:20 +08:00
xtaci
545ecee9d2
fix the deadline test
2018-10-01 11:19:09 +08:00
xtaci
8edaea72f5
fix a test
2018-10-01 11:16:18 +08:00
xtaci
b993df6776
simplify header handling
2018-09-28 19:40:24 +08:00
Artyom Pervukhin
5eec685c3d
Remove no more used import in tests
...
Profiles can be generated directly by the go test command when run with
-*profile flags.
2017-12-13 13:05:05 +03:00
Artyom Pervukhin
c600108e14
Don't leak net.Listener in testing helper getTCPConnectionPair
2017-12-13 13:03:11 +03:00
Artyom Pervukhin
545966cdfb
Get rid of hard-coded ports in tests
...
Dynamically allocate ports for test listeners to avoid possible
collisions with local services. Set up and tear down listener for each
test.
2017-12-13 13:00:07 +03:00
Artyom Pervukhin
d9d7e13dec
Fix TestServerEcho
...
Do not call testing.T.Fatal from inside extra goroutine. Documentation
for testing.T https://golang.org/pkg/testing/#T states that Fatal method
should only be called from the main goroutine running test:
> A test ends when its Test function returns or calls any of the methods
> FailNow, Fatal, Fatalf, SkipNow, Skip, or Skipf. Those methods, as well as
> the Parallel method, must be called only from the goroutine running the Test
> function.
>
> The other reporting methods, such as the variations of Log and Error, may be
> called simultaneously from multiple goroutines.
Change t.Fatal call with t.Error call.
While here, also simplify goroutine body to be have less indentation levels and
be just a function returning error while using idiomatic defers to close
things.
2017-12-13 12:19:02 +03:00
Artyom Pervukhin
d4fb677d96
Simplify condition in tests
...
Condition
if session.IsClosed() != true
can be reduced to
if !session.IsClosed()
2017-12-13 12:01:59 +03:00
xtaci
0f6b9aaeca
update tests
2017-04-05 10:19:56 +08:00
xtaci
cceb67beeb
rename cmdRST->cmdFIN to clear up misunderstanding
2017-02-16 14:47:34 +08:00
Ox Cart
f28ad86390
Fixed deadlock on concurrent closing
2016-11-29 07:28:40 -06:00
xtaci
b4a6fb87c6
add a test
2016-11-15 13:43:03 +08:00
Audrius Butkevicius
8510e3505d
Add WriteDeadline
2016-11-12 07:25:04 +00:00
Ox Cart
f46f1e9066
Added ability to set read deadline
2016-11-01 07:52:27 -05:00
xtaci
bcd7a0bf02
upd test
2016-09-09 17:29:29 +08:00
xtaci
87ca05a080
simplification
2016-09-09 17:26:07 +08:00
xtaci
c2aeb5b3d1
update test
2016-09-08 15:54:36 +08:00
xtaci
88f1e7a2c0
upd test
2016-09-08 11:29:49 +08:00
xtaci
f78c3064f7
lint
2016-09-06 16:23:36 +08:00
xtaci
f4d95a8da1
add more test
2016-09-05 15:06:22 +08:00
xtaci
c3c1d44c0b
add TestReadStreamAfterSessionClose
2016-09-05 14:25:55 +08:00
xtaci
ff07989d4a
remove a useless cmd
2016-09-03 21:21:58 +08:00
xtaci
4fe17c2ede
reduce alloc
2016-09-03 11:12:49 +08:00
xtaci
bea9b24bcf
add test
2016-09-02 15:39:09 +08:00
xtaci
1d05a7b82c
take back write lock
2016-09-02 10:26:36 +08:00
xtaci
8f2e1d1485
upd test
2016-09-01 22:49:06 +08:00