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
xtaci
387f0dde6d
add test
2016-09-01 22:04:07 +08:00
xtaci
5c9905dd62
upd test
2016-09-01 21:39:41 +08:00
xtaci
26edab0974
update test
2016-09-01 21:36:29 +08:00
xtaci
f26ab8306a
add server open test
2016-09-01 20:36:33 +08:00
xtaci
d7374b1938
fix for tiny buffer
2016-09-01 18:03:00 +08:00
xtaci
3551362d5c
add more tests
2016-09-01 17:31:53 +08:00
xtaci
0e50de2a6d
fix a deadlock
2016-09-01 16:34:13 +08:00
xtaci
f76cca5f61
add Config
2016-09-01 12:58:11 +08:00
xtaci
3f76ba8c8b
upd
2016-09-01 10:49:26 +08:00
xtaci
6a20537690
upd
2016-08-31 23:13:51 +08:00
xtaci
96bc04bf8f
add cmdTerminate
2016-08-31 18:24:44 +08:00
xtaci
aaaca958eb
upd
2016-08-31 17:45:54 +08:00
xtaci
5836a971d3
upd
2016-08-31 16:23:26 +08:00