use of java.nio.channels.Pipe.SinkChannel in project jeromq by zeromq.
the class PollTest method testPollPipe.
@Test(timeout = 1000)
public void testPollPipe() throws IOException {
Pipe pipe = Pipe.open();
assertThat(pipe, notNullValue());
SinkChannel sink = pipe.sink();
assertThat(sink, notNullValue());
sink.configureBlocking(false);
SourceChannel source = pipe.source();
assertThat(source, notNullValue());
source.configureBlocking(false);
try {
assertPoller(source, sink, sink::write, source::read);
} finally {
sink.close();
source.close();
}
}
use of java.nio.channels.Pipe.SinkChannel in project j2objc by google.
the class PipeTest method test_sink.
/**
* @tests java.nio.channels.Pipe#sink()
*/
public void test_sink() throws IOException {
Pipe pipe = Pipe.open();
SinkChannel sink = pipe.sink();
assertTrue(sink.isBlocking());
}
use of java.nio.channels.Pipe.SinkChannel in project robovm by robovm.
the class PipeTest method test_sink.
/**
* @tests java.nio.channels.Pipe#sink()
*/
public void test_sink() throws IOException {
Pipe pipe = Pipe.open();
SinkChannel sink = pipe.sink();
assertTrue(sink.isBlocking());
}
use of java.nio.channels.Pipe.SinkChannel in project robovm by robovm.
the class SSLEngineTest method prepareEngines.
void prepareEngines() throws IOException {
Pipe clientSendPipe = Pipe.open();
Pipe serverSendPipe = Pipe.open();
SinkChannel clientSink = clientSendPipe.sink();
SourceChannel serverSource = clientSendPipe.source();
SinkChannel serverSink = serverSendPipe.sink();
SourceChannel clientSource = serverSendPipe.source();
clientEngine = new HandshakeHandler(true, clientSource, clientSink);
serverEngine = new HandshakeHandler(false, serverSource, serverSink);
}
Aggregations