blob: 1309f15f858098d18d1608dc7c96adc11506336a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
describe "partially closable sockets", shared: true do
specify "if the write end is closed then the other side can read past EOF without blocking" do
@s1.write("foo")
@s1.close_write
@s2.read("foo".size + 1).should == "foo"
end
specify "closing the write end ensures that the other side can read until EOF" do
@s1.write("hello world")
@s1.close_write
@s2.read.should == "hello world"
end
end
|