Search in sources :

Example 1 with SourceChannel

use of java.nio.channels.Pipe.SourceChannel in project robovm by robovm.

the class PipeTest method test_source.

/**
	 * @tests java.nio.channels.Pipe#source()
	 */
public void test_source() throws IOException {
    Pipe pipe = Pipe.open();
    SourceChannel source = pipe.source();
    assertTrue(source.isBlocking());
}
Also used : SourceChannel(java.nio.channels.Pipe.SourceChannel) Pipe(java.nio.channels.Pipe)

Example 2 with SourceChannel

use of java.nio.channels.Pipe.SourceChannel 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);
}
Also used : SourceChannel(java.nio.channels.Pipe.SourceChannel) Pipe(java.nio.channels.Pipe) SinkChannel(java.nio.channels.Pipe.SinkChannel)

Aggregations

Pipe (java.nio.channels.Pipe)2 SourceChannel (java.nio.channels.Pipe.SourceChannel)2 SinkChannel (java.nio.channels.Pipe.SinkChannel)1