255 Commits
Author SHA1 Message Date
xtaci 8a71918d00 copy directly into bytes.Buffer without a tmp buffer v1.2.2 2019-04-08 15:47:16 +08:00
xtaci 427ad5fcc4 remove log v1.2.1 2019-04-07 22:00:13 +08:00
xtaci 77b36b6b12 add buffersWriter interface and optimize for gathered writing 2019-04-07 21:59:32 +08:00
xtaci b45c894069 fan in writeFrameInternal v1.1.2 2019-03-24 18:40:36 +08:00
xtaciandGitHub f4f6ca39c6 Merge pull request #43 from jannson/fix-keepalive-block
fix: writeFrame may block forever in keepalive function
v1.0.8 v1.0.9 v1.1.1
2019-02-13 00:38:44 +08:00
jannson d48c64181c no errTimeout checking for writeFrameInternal in keepalive, do it simple, but better 2019-02-13 00:36:40 +08:00
jannson 0bafab3e44 use writeFrameInternal instead of writeFrameWithDeadline 2019-02-12 23:58:45 +08:00
jannson 5bef4b83d6 calling writeFrameWithDeadline in writeFrame for better reading 2019-02-12 23:50:01 +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
janson 0b0a666e49 fix: writeFrame may block forever in keepalive function, then it never timeout 2019-02-12 10:00:08 +08:00
xtaciandGitHub 6cf098d439 Merge pull request #40 from CovenantSQL/master
Expose Stream.die via Stream.GetDieCh for canceling running golang RPC func
v1.1.0
2018-12-05 12:40:55 +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
auxten d3b4611595 Expose Stream.die to Stream.Die for canceling running golang RPC func 2018-12-04 12:14:14 +08:00
xtaciandGitHub f19baee51e Merge pull request #39 from HaraldNordgren/go_versions
Bump Go versions and use '.x' to always get latest patch versions
2018-10-28 23:51:15 +08:00
Harald Nordgren 8a3a4d83f8 Bump Go versions and use '.x' to always get latest patch versions 2018-10-28 16:31:56 +01: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 8cc526d020 fix travis build version 2018-10-01 11:10:15 +08:00
xtaci 23098c5322 upd framesize to 32768 to fix crash to the overflow of uint16 2018-10-01 10:54:41 +08:00
xtaci 9bcf9cb852 adjust default frame size 2018-09-28 20:19:29 +08:00
xtaci b993df6776 simplify header handling 2018-09-28 19:40:24 +08:00
xtaciandGitHub e28719eede Merge pull request #27 from longzhiri/master
fix bug: read 0 bytes from a stream will block forever
v1.0.7
2018-01-04 17:41:28 +08:00
zero d502b06712 fix bug: read 0 bytes from a stream will block forever 2018-01-04 17:07:39 +08:00
xtaci c3e18246ff remove an unnecessary condition 2017-12-16 17:30:04 +08:00
xtaciandGitHub c898867f4f Merge pull request #26 from artyom/master
Fixes of issues discovered by code analysis tool
2017-12-13 18:37:12 +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
Artyom Pervukhin 99d8597e59 Replace d.Sub(time.Now()) with time.Until(d) 2017-12-13 12:00:10 +03:00
xtaci ebec7ef257 adjust read after close behavior https://github.com/xtaci/smux/issues/23 v1.0.6 2017-07-01 21:47:59 +08:00
xtaci 2de5471dfc use mutex instead of atomic for accuracy 2017-04-22 11:45:03 +08:00
xtaci b19bc4137c add a flag for goAway 2017-04-22 11:22:36 +08:00
xtaci 9d687f7d77 handle stream id overflow 2017-04-22 11:05:49 +08:00
xtaci 0f6b9aaeca update tests 2017-04-05 10:19:56 +08:00
xtaciandGitHub a74b5eac0f Update README.md 2017-03-28 12:36:49 +08:00
xtaciandGitHub 57febe8f7e Update README.md 2017-03-28 11:02:11 +08:00
xtaciandGitHub cfd75252c8 Update README.md 2017-03-28 11:01:51 +08:00
xtaciandGitHub 415a8a3ae0 Update README.md 2017-03-28 11:01:15 +08:00
xtaci a1a5df8f92 simplify returnToken v1.0.5 2017-03-22 20:12:24 +08:00
xtaci e183f89624 use notify chan instead of sync.Cond 2017-03-21 13:42:08 +08:00
xtaci 1e5d8c0c13 prealloc slice 2017-03-21 13:42:08 +08:00
xtaciandGitHub bfc89bc3f7 Merge pull request #14 from rogers0/PR/fix_license
Update LICENSE
2017-03-07 17:58:47 +08:00
Roger Shimizu 5d020f06aa Update LICENSE
Make license consistent with golang-github-xtaci-kcp project
2017-03-07 18:51:53 +09:00
xtaci 949ec4dc3f comment on cmdFIN 2017-02-16 15:00:03 +08:00
xtaci cceb67beeb rename cmdRST->cmdFIN to clear up misunderstanding 2017-02-16 14:47:34 +08:00