protected override void Create(out System.IO.Stream peer, out ISocketPortBuffers socketBuffer)
        {
            TestSocketPair pair = new TestSocketPair();
            TestSocketPair was  = Interlocked.Exchange(ref _tmpPair, pair);

            if (was != null)
            {
                was.Dispose();
            }
            //
            peer         = pair.StreamA;
            socketBuffer = new SocketBuffers(pair.SocketB);
        }
Beispiel #2
0
        protected override void Create(out Stream peer, out ISocketPortBuffers socketBuffer)
        {
            TestRfCommIf    iface;
            BluetoothClient cli;
            Stream          tmpStrm2;
            TestRfcommPort  port;

            WidcommBluetoothClientCommsTest.Create_ConnectedBluetoothClient(out iface, out port, out cli, out tmpStrm2);
            peer         = cli.GetStream();
            socketBuffer = new WidcommPortBuffers(port);
            // Start of with no capacity for write.
            socketBuffer.AllowWrite(0);
        }
Beispiel #3
0
 protected static void ReleaseWriteOperation(ISocketPortBuffers port, byte[] data)
 {
     port.AllowWrite(data);
 }
Beispiel #4
0
 abstract protected void Create(out Stream peer, out ISocketPortBuffers socketBuffer);
Beispiel #5
0
 protected static void ReleaseReadOperation(ISocketPortBuffers port, byte[] data)
 {
     port.NewReceive(data);
 }