Examples of DataFrame


Examples of Extasys.DataFrame

                    {
                        try
                        {
                            synchronized (fMyTCPConnector.fReceiveDataLock)
                            {
                                fMyTCPConnector.fLastIncomingPacket = new IncomingTCPClientPacket(fMyTCPConnector, new DataFrame(fReadBuffer, 0, bytesRead), fMyTCPConnector.fLastIncomingPacket);
                            }
                        }
                        catch (Exception ex)
                        {
                            fMyTCPConnector.Stop();
View Full Code Here

Examples of Extasys.DataFrame

        {
            fIncomingDataBuffer.Append(bytes);
            fIndexOfETX = fIncomingDataBuffer.IndexOf(fETXStr);
            while (fIndexOfETX > -1)
            {
                fMyConnector.getMyExtasysTCPClient().OnDataReceive(fMyConnector, new DataFrame(fIncomingDataBuffer.SubList(0, fIndexOfETX)));
                fIncomingDataBuffer.Delete(0, fIndexOfETX + fETXLength);
                fIndexOfETX = fIncomingDataBuffer.IndexOf(fETXStr);
            }
        }
        catch (Exception ex)
View Full Code Here

Examples of Extasys.DataFrame

                    fClientConnection.fMyListener.fBytesIn += bytesRead;

                    // PACKET WITHOUT MESSAGE COLLECTOR
                    synchronized (fClientConnection.fReceiveDataLock)
                    {
                        fClientConnection.fLastIncomingPacket = new IncomingTCPClientConnectionPacket(fClientConnection, new DataFrame(fReadBuffer, 0, bytesRead), fClientConnection.fLastIncomingPacket);
                    }
                }
                else
                {
                    fClientConnection.DisconnectMe();
View Full Code Here

Examples of Extasys.DataFrame

        {
            fIncomingDataBuffer.Append(bytes);
            fIndexOfETX = fIncomingDataBuffer.IndexOf(fETXStr);
            while (fIndexOfETX > -1)
            {
                fMyClient.getMyTCPListener().getMyExtasysTCPServer().OnDataReceive(fMyClient, new DataFrame(fIncomingDataBuffer.SubList(0, fIndexOfETX)));
                fIncomingDataBuffer.Delete(0, fIndexOfETX + fETXLength);
                fIndexOfETX = fIncomingDataBuffer.IndexOf(fETXStr);
            }
        }
        catch (Exception ex)
View Full Code Here

Examples of org.eclipse.jetty.http2.frames.DataFrame

            HeadersFrame response = headersRef.get();
            Assert.assertNotNull(response);
            MetaData.Response responseMetaData = (MetaData.Response)response.getMetaData();
            Assert.assertEquals(200, responseMetaData.getStatus());

            DataFrame responseData = dataRef.get();
            Assert.assertNotNull(responseData);
            Assert.assertArrayEquals(content, BufferUtil.toArray(responseData.getData()));
        }
    }
View Full Code Here

Examples of org.eclipse.jetty.http2.frames.DataFrame

        return Result.PENDING;
    }

    private boolean onData(ByteBuffer buffer, boolean fragment, int padding)
    {
        DataFrame frame = new DataFrame(getStreamId(), buffer, !fragment && isEndStream(), padding);
        return notifyData(frame);
    }
View Full Code Here

Examples of org.eclipse.jetty.http2.frames.DataFrame

        if (LOG.isDebugEnabled())
        {
            LOG.debug("HTTP2 Response #{}: {} content bytes{}",
                    stream.getId(), content.remaining(), lastContent ? " (last chunk)" : "");
        }
        DataFrame frame = new DataFrame(stream.getId(), content, lastContent);
        stream.data(frame, callback);
    }
View Full Code Here

Examples of org.eclipse.jetty.http2.frames.DataFrame

        @Override
        public void succeeded()
        {
            flowControl.onDataSent(stream, length);
            // Do we have more to send ?
            DataFrame dataFrame = (DataFrame)frame;
            if (dataFrame.remaining() > 0)
            {
                // We have written part of the frame, but there is more to write.
                // We need to keep the correct ordering of frames, to avoid that other
                // frames for the same stream are written before this one is finished.
                flusher.prepend(this);
            }
            else
            {
                // Only now we can update the close state
                // and eventually remove the stream.
                stream.updateClose(dataFrame.isEndStream(), true);
                if (stream.isClosed())
                    removeStream(stream, true);
                callback.succeeded();
            }
        }
View Full Code Here

Examples of org.eclipse.jetty.http2.frames.DataFrame

        session.newStream(requestFrame, promise, new Stream.Listener.Adapter());
        final Stream stream = promise.get(5, TimeUnit.SECONDS);

        sleep(idleTimeout / 2);
        final CountDownLatch dataLatch = new CountDownLatch(1);
        stream.data(new DataFrame(stream.getId(), ByteBuffer.allocate(1), false), new Callback.Adapter()
        {
            private int sends;

            @Override
            public void succeeded()
            {
                sleep(idleTimeout / 2);
                final boolean last = ++sends == 2;
                stream.data(new DataFrame(stream.getId(), ByteBuffer.allocate(1), last), !last ? this : new Adapter()
                {
                    @Override
                    public void succeeded()
                    {
                        dataLatch.countDown();
View Full Code Here

Examples of org.eclipse.jetty.http2.frames.DataFrame

        };
        session.newStream(requestFrame, promise, new Stream.Listener.Adapter());
        final Stream stream = promise.get(5, TimeUnit.SECONDS);

        sleep(idleTimeout / 2);
        stream.data(new DataFrame(stream.getId(), ByteBuffer.allocate(1), false), Callback.Adapter.INSTANCE);
        sleep(idleTimeout / 2);
        stream.data(new DataFrame(stream.getId(), ByteBuffer.allocate(1), false), Callback.Adapter.INSTANCE);
        sleep(idleTimeout / 2);
        stream.data(new DataFrame(stream.getId(), ByteBuffer.allocate(1), true), Callback.Adapter.INSTANCE);

        Assert.assertFalse(resetLatch.await(0, TimeUnit.SECONDS));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.