Niklas Keller
94f4322c7d
Fix LineReader order
2019-08-22 21:57:02 +02:00
Niklas Keller
2b27515138
Make LineReaderTest compatible with PHP 7.0
2019-08-22 21:33:04 +02:00
Niklas Keller
bb5e38722e
Move LineReaderTest to correct directory
2019-08-22 21:04:24 +02:00
Niklas Keller
c75af3778b
Fix ResourceOutputStream closed detection ( #60 )
...
The previous mechanism with feof doesn't work for systemd launched processes.
Fixes #58 .
2019-06-03 23:45:17 +02:00
Niklas Keller
24484fa356
Move testClosedRemoteSocketWithFork to ResourceInputStreamTest
...
Whether writing to the socket fails is implementation defined, see https://stackoverflow.com/a/4022160/2373138 .
Shutting down the read side of the socket generally doesn't have any effect on the peer, seems like this is due to the local host implementation on Linux.
2019-06-03 23:24:59 +02:00
d8cc314d62
Add web SAPI input/output stream getter functions ( #61 )
2019-06-03 23:01:43 +02:00
Gabriel Ostrolucký
d5cd42a765
Add chunksize setter to Resource*Stream classes ( #55 )
...
Fixes #50 .
2019-03-31 16:51:36 +02:00
Niklas Keller
56f719633f
Fix code style
2018-12-25 13:18:26 +01:00
Niklas Keller
3a4e493d39
Change #47 test case
2018-12-25 13:13:28 +01:00
Niklas Keller
91d0d18b60
Change #47 test case
2018-12-25 13:04:03 +01:00
Niklas Keller
23d720fbb1
Add test case for #47
2018-12-25 12:59:12 +01:00
Aaron Piotrowski
2dda482685
Add getStd*() functions
2018-10-22 20:36:00 +02:00
Niklas Keller
17fae3bcec
Fix code style
2018-10-03 17:37:23 +02:00
Niklas Keller
0b282a7321
Add infection and tests
2018-09-23 21:30:08 +02:00
Niklas Keller
d161589772
Apply PSR-2
2018-09-22 16:04:00 +02:00
Niklas Keller
73257690b0
Fix import order
2018-09-22 16:04:00 +02:00
Niklas Keller
a4cf31f089
Add buffer test
2018-09-22 16:04:00 +02:00
Niklas Keller
1b75b122e6
Fix ZlibInputStreamTest::testRead() for Windows
2018-04-04 07:33:09 +02:00
Aaron Piotrowski
da357d1579
Proper fix for remote closed streams
...
Fixes #40 . Streams on MacOS (and possibly FreeBSD) that are closed by the remote still allow writing, returning a non-zero from fwrite(). EOF then is false, since data was written to the buffer. EOF needed to be checked before calling fwrite().
2018-04-03 19:08:18 -05:00
Niklas Keller
1184827fd8
Revert "Update test"
...
This reverts commit 5ba0469d7a
.
The test should verify that the socket is detected as closed even if the
work is still alive and has an open FD.
2018-04-03 22:12:42 +02:00
Aaron Piotrowski
5ba0469d7a
Update test
2018-04-03 12:23:39 -05:00
Niklas Keller
43a93e6240
Add closed stream test with leaked FDs
2018-04-03 18:30:21 +02:00
Niklas Keller
56e814943a
Add tests for dead socket detection
...
Relates to #40 .
2018-04-03 18:20:40 +02:00
Aaron Piotrowski
6bd0be750d
Add Payload
...
Similar to Message, but does not implement Promise to avoid all the issues that are associated with that.
2018-03-13 09:53:18 -05:00
Sébastien Nikolaou
e00c6d4926
Simplify OutputBuffer tests
2017-10-17 21:24:21 +02:00
Sébastien Nikolaou
48bb2ebf78
Extract OutputBuffer class
2017-10-17 21:24:21 +02:00
Sébastien Nikolaou
8af72be249
Fix code standards
2017-10-17 21:24:21 +02:00
Sébastien Nikolaou
4e0e9a6b66
Increase test coverage
2017-10-17 21:24:21 +02:00
Niklas Keller
af613a0a77
Fix Message::read() if stream fails with a pending read
2017-10-07 10:28:45 +02:00
Bob Weinand
a70a650793
Also \assert() against fclose() instead of silently returning null
2017-07-15 10:38:47 +02:00
Bob Weinand
6b9074fbf2
Prevent SIGPIPE test aborts with phpdbg
2017-07-15 10:11:27 +02:00
Bob Weinand
666ece18a4
Fix invalid StreamException upon full write buffer
...
And add a few tests with chunk size writes
2017-07-15 10:06:12 +02:00
Niklas Keller
4777508637
Fail streaming messages correctly on read failures
...
Fixes #18 .
2017-06-28 11:35:12 +02:00
Niklas Keller
161c73471d
stream_socket_shutdown resources in ROS on close
2017-06-18 20:16:05 +02:00
Niklas Keller
cc42b43fe4
Add test for large writes
2017-06-18 19:58:35 +02:00
Aaron Piotrowski
7a8d6d5f1f
Remove Parser
...
Moved to a separate repository at amphp/parser.
2017-06-07 22:23:44 -05:00
Niklas Keller
b553a46151
Add parser test
2017-06-05 13:45:39 +02:00
Niklas Keller
bf1635fa39
Suppress warning for invalid contexts, we throw an exception there
2017-05-22 14:44:36 +02:00
Niklas Keller
2df6b8cde3
Remove unused import
2017-05-17 09:39:32 +02:00
Niklas Keller
0bba99c49c
Add missing foobar.txt.gz
2017-05-17 09:37:15 +02:00
Niklas Keller
34a571cd85
Add basic zlib input stream test
2017-05-17 08:17:15 +02:00
Niklas Keller
9e90d1fa09
Add tests, fix ResourceOutputStream writable check
2017-05-16 23:27:48 +02:00
Niklas Keller
71745c6105
Make Message accept an InputStream instead of an Iterator
...
The purpose of Message is to allow streaming and buffering of an
InputStream with a simple API. Before this commit, Message served a
second purpose: Converting an Amp\Iterator to an InputStream. This has
been separated to allow ZlibInputStream and other InputStreams to be
used as Message. Converting an Amp\Iterator to an InputStream is now
possible using the new IteratorStream class.
2017-05-14 16:40:42 +02:00
Aaron Piotrowski
cfbf25e3b5
Remove close() from interfaces
2017-05-11 18:08:45 -05:00
Aaron Piotrowski
11a92648d1
Revert IteratorStream name to Message
2017-05-10 18:20:34 -05:00
Aaron Piotrowski
abb7c9c6b5
Use back-pressure
2017-05-10 18:04:10 -05:00
Niklas Keller
a66fef9b55
Add InMemoryStream
2017-05-08 11:15:10 +02:00
Aaron Piotrowski
6241988750
Restore Message as IteratorStream
2017-05-07 22:10:16 +02:00
Niklas Keller
bf90335bb6
Major API change + merged Reader and Writer from amphp/socket
2017-04-30 08:33:16 +02:00
Niklas Keller
16fc80ae3b
Update and fix php-cs-fixer and code style
2017-04-26 08:27:52 +02:00