Alex Crichton
29144e6c9b
Return NotReady
from TcpStream::read_buf
2017-03-27 08:55:30 -07:00
Alex Crichton
8d58b70ce6
Merge pull request #195 from living180/master
...
Fix logic error in TcpStream.read_buf()
2017-03-27 10:54:18 -05:00
Daniel Harding
f5db8136d7
Fix logic error in TcpStream.read_buf()
...
If the underlying read_bufs() call returned a WouldBlock error,
TcpStream.read_buf() was erroneously calling self.io.need_write(), when
it should actually call self.io.need_read().
2017-03-27 16:54:56 +02:00
Alex Crichton
45e69bfb61
Return NotReady
from TcpStream::write_buf
...
Closes #194
2017-03-27 07:33:18 -07:00
Alex Crichton
37e2870f04
Limit the scope of borrow_mut in consume_queue
...
Otherwise we may accidentally hold the borrowed ref cell for too long which can
cause a borrow error.
Closes #190
2017-03-15 22:59:08 -07:00
Alex Crichton
8383e8bf7a
Remove deprecated benchmark
2017-03-15 22:38:23 -07:00
Alex Crichton
c80953f078
Bump to 0.1.6
2017-03-15 10:30:10 -07:00
Alex Crichton
8c1838e093
Fix build on beta/nightly
...
I believe this happened due to a very recent rustc soundness fix!
Closes #189
2017-03-15 10:29:17 -07:00
Alex Crichton
e79f665440
Bump to 0.1.5
2017-03-15 10:06:32 -07:00
Alex Crichton
a8e09c5608
Add the proxy example from #100
2017-03-15 09:59:09 -07:00
Alex Crichton
89fcc96dd4
Migrate to using tokio-io
...
Deprecate the existing `io` module in this crate entirely.
More details coming soon!
Closes #61
2017-03-15 09:46:54 -07:00
Alex Crichton
8fecf98aef
Merge pull request #187 from king6cong/master
...
comment rewording
2017-03-07 09:08:17 -06:00
Alex Crichton
b0d04e04f2
Merge pull request #174 from asomers/aioprep
...
Replace magic numbers with constants from mio
2017-03-07 08:58:37 -06:00
king6cong
a67e0d3efb
comment rewording
2017-03-07 11:39:51 +08:00
Alan Somers
eb66ff3ad1
Replace more instances of magic numbers
2017-03-06 20:16:12 -07:00
Alex Crichton
5c411c548b
Add Debug for {Handle,Remote,Core}
...
Closes #170
2017-03-06 12:16:09 -08:00
Alan Somers
3b8f1695ff
Define constants to replace magic numbers
2017-03-05 14:38:55 -07:00
Alex Crichton
bd75a522c3
Merge pull request #186 from seeekr/patch-1
...
fix typo in reactor::Core::run docs
2017-03-03 13:27:41 -06:00
Denis Andrejew
1722d8ed45
fix typo in reactor::Core::run docs
2017-03-03 18:38:56 +00:00
Alex Crichton
6a4df9a3b6
Merge pull request #181 from JanZerebecki/fix-typo-core-run
...
Fix typo in docblock for Core::run()
2017-02-27 08:46:48 -08:00
Jan Zerebecki
e8bd2117d0
Fix typo in docblock for Core::run()
2017-02-27 11:07:19 +01:00
Alex Crichton
b773d55444
Tweak Debug output of PollEvented
2017-02-25 21:43:54 -08:00
Alex Crichton
005994cdea
Merge pull request #180 from agrover/debug-for-pollevented
...
Implement Debug for PollEvented<E> if E implements Debug
2017-02-25 23:42:35 -06:00
Andy Grover
9e3f3caad0
Implement Debug for PollEvented<E> if E implements Debug
...
Useful, esp since mio::unix::EventedFd already implements Debug.
Signed-off-by: Andy Grover <agrover@redhat.com>
2017-02-24 12:57:05 -08:00
Alex Crichton
6c774756e6
Merge pull request #173 from partim/easybuf-traits
...
Add PartialOrd, Ord, and Hash to EasyBuf, generalize PartialEq.
2017-02-21 09:07:24 -06:00
Carl Lerche
a3c1796a45
Merge pull request #175 from mayhewj/rename-sender
...
Rename sender in connect example
2017-02-20 08:26:03 -08:00
Justin Mayhew
c9a8208c8a
Rename sender in connect example
2017-02-19 15:02:31 -04:00
Martin Hoffmann
54dcd3a015
Add PartialOrd and Ord to EasyBuf, generalize PartialEq.
2017-02-18 20:30:01 +01:00
Alex Crichton
1bc2ef6aff
Merge pull request #168 from Byron/master
...
Implement PartialEq for EasyBuf
2017-02-13 09:36:43 -06:00
Sebastian Thiel
fe9a798811
Implement PartialEq for EasyBuf
2017-02-13 07:55:26 +01:00
Alex Crichton
a597b962a3
Merge pull request #166 from Byron/master
...
Allocation in get_mut() always uses 8 * 1024 bytes
2017-02-12 11:27:47 -06:00
Sebastian Thiel
65c5c5241b
Test semantics of buffer allocation of get_mut()
...
* if remaining bytes are smaller then 8 * 1024, allocate 8 * 1024
* otherwise allocate as much as needed to hold the remaining bytes
without re-allocations.
2017-02-12 09:47:03 +01:00
Sebastian Thiel
e11dd06ead
Assure we don't have to allocate while growing the vector
...
We now have enough capacity to copy the unconsumed portion
of the previous frame.
2017-02-11 10:23:02 +01:00
Sebastian Thiel
5adde38a65
Allocation in get_mut() always uses 8 * 1024 bytes
...
The previous implementation would always use the capacity
of the previous buffer, which would effectively prevent it
from ever shrinking.
This also means that protocol with greater variance in
possible frame sizes would likely be heavily over-allocating.
If these implementations use zero-copy, this would imply
that even small frames kept alive by the client would use
large amounts of memory.
The change is motivated by the implementation of the
cassandra-protocol, which allows frames of up to 256MB
in size, which solely depend on the kind of query.
2017-02-11 09:01:07 +01:00
Alex Crichton
574b6f0c54
Merge pull request #162 from manuel-woelker/master
...
impl Into<Vec<u8>> for EasyBuf (cf. #120 )
2017-02-10 18:32:00 -06:00
Manuel Woelker
b4cd223476
impl Into<Vec<u8>> for EasyBuf (cf. #120 )
2017-02-10 23:01:46 +01:00
Manuel Woelker
f86addf113
fix allocating EasyBuf::get_mut() leaving vector too large (cf. #162 )
2017-02-10 22:58:16 +01:00
Alex Crichton
a4017ee846
Merge pull request #164 from fortytw2/patch-1
...
rename sock -> listener in docs
2017-02-08 12:40:33 -08:00
Ian Chiles
8a360f87f5
rename sock -> listener in docs
...
Makes it much clearer for someone fairly new to rust (like me) to follow along when the same named variable aren't totally different things :)
2017-02-08 20:23:54 +01:00
Alex Crichton
cecaad715d
Merge pull request #161 from seeekr/patch-1
...
Fix typo in non-doc comment in copy.rs
2017-01-27 14:49:41 -08:00
Denis Andrejew
e31b76c047
Fix typo in non-doc comment in copy.rs
2017-01-27 22:42:04 +00:00
Alex Crichton
05f01d6c9b
Merge pull request #157 from seanmonstar/vecio
...
add read_bufs and write_bufs to Io and TcpStream
2017-01-27 14:34:26 -08:00
Sean McArthur
829563ccfc
add read_bufs and write_bufs to Io and TcpStream
2017-01-27 11:32:08 -08:00
Alex Crichton
cf74a6b2c9
Merge pull request #159 from jtescher/fix-typos
...
Fix typos
2017-01-24 21:05:21 -08:00
Julian Tescher
baeb35b6d4
Fix typos
2017-01-24 20:52:48 -08:00
Alex Crichton
a4b4d57cb7
Touch up TcpStream::from_stream
2017-01-24 16:39:01 -08:00
Alex Crichton
4363663dea
Merge pull request #158 from GuillaumeGomez/from_stream
...
Add from_stream method
2017-01-24 16:37:28 -08:00
Guillaume Gomez
c1f1320203
Add from_stream method
2017-01-24 23:49:50 +01:00
Alex Crichton
5b425dfed9
Remove unneeded macro_use
2017-01-23 20:16:12 -08:00
Alex Crichton
fcdeb0e5d6
Update crates.io metadata
2017-01-23 20:15:49 -08:00