Examples of StringEndPoint


Examples of org.eclipse.jetty.io.bio.StringEndPoint

  int seq = -1;

  @Test
  public void testTcp() throws Exception
 
    StringEndPoint ep = new StringEndPoint();
    ep.setInput(_msg);
    SipParser parser = new SipParser(new ByteArrayBuffer(1024), ep, new Handler());
   
    try
    {
      parser.parse();
View Full Code Here

Examples of org.eclipse.jetty.io.bio.StringEndPoint

    StringBuffer msgs = new StringBuffer();
    for (int i = 0; i < 1000; i++)
    {
      msgs.append("INVITE sip:foo SIP/2.0\r\nX-Seq: " + i + "\r\nContent-Length:0\r\n\r\n");
    }
    StringEndPoint ep = new StringEndPoint();
    ep.setInput(msgs.toString());
   
    SipParser parser = new SipParser(new ByteArrayBuffer(55889), ep, new Handler());
    for (int i = 0; i < 1000; i++)
    {
      seq = -1;
View Full Code Here

Examples of org.eclipse.jetty.io.bio.StringEndPoint

  }

  @Test
  public void testOverflow() throws Exception
  {
    StringEndPoint ep = new StringEndPoint();
    ep.setInput(_msg);
    SipParser parser = new SipParser(new ByteArrayBuffer(1), ep, new Handler());
   
    int size = 1;
    boolean overflow = false;
    do
View Full Code Here

Examples of org.mortbay.io.bio.StringEndPoint

    }

    public void testLineParse0()
  throws Exception
    {
        StringEndPoint io=new StringEndPoint();
        io.setInput("POST /foo HTTP/1.0\015\012" + "\015\012");
        ByteArrayBuffer buffer= new ByteArrayBuffer(4096);
        SimpleBuffers buffers=new SimpleBuffers(new Buffer[]{buffer});

        Handler handler = new Handler();
        HttpParser parser= new HttpParser(buffers,io, handler, buffer.capacity(), 0);
View Full Code Here

Examples of org.mortbay.io.bio.StringEndPoint

    }

    public void testLineParse1()
  throws Exception
    {
        StringEndPoint io=new StringEndPoint();
        io.setInput("GET /999\015\012");
        ByteArrayBuffer buffer= new ByteArrayBuffer(4096);
        SimpleBuffers buffers=new SimpleBuffers(new Buffer[]{buffer});

        f2= null;
        Handler handler = new Handler();
View Full Code Here

Examples of org.mortbay.io.bio.StringEndPoint

    }

    public void testLineParse2()
  throws Exception
    {
        StringEndPoint io=new StringEndPoint();
        io.setInput("POST /222  \015\012");
        ByteArrayBuffer buffer= new ByteArrayBuffer(4096);
        SimpleBuffers buffers=new SimpleBuffers(new Buffer[]{buffer});

        f2= null;
        Handler handler = new Handler();
View Full Code Here

Examples of org.mortbay.io.bio.StringEndPoint

    }

    public void testLineParse3()
        throws Exception
    {
        StringEndPoint io=new StringEndPoint();
        io.setInput("POST /fo\u0690 HTTP/1.0\015\012" + "\015\012");
        ByteArrayBuffer buffer= new ByteArrayBuffer(4096);
        SimpleBuffers buffers=new SimpleBuffers(new Buffer[]{buffer});

        Handler handler = new Handler();
        HttpParser parser= new HttpParser(buffers,io, handler, buffer.capacity(), 0);
View Full Code Here

Examples of org.mortbay.io.bio.StringEndPoint

    }

    public void testLineParse4()
        throws Exception
    {
        StringEndPoint io=new StringEndPoint();
        io.setInput("POST /foo?param=\u0690 HTTP/1.0\015\012" + "\015\012");
        ByteArrayBuffer buffer= new ByteArrayBuffer(4096);
        SimpleBuffers buffers=new SimpleBuffers(new Buffer[]{buffer});

        Handler handler = new Handler();
        HttpParser parser= new HttpParser(buffers,io, handler, buffer.capacity(), 0);
View Full Code Here

Examples of org.mortbay.io.bio.StringEndPoint

    }

    public void testHeaderParse()
  throws Exception
    {
        StringEndPoint io=new StringEndPoint();
        io.setInput(
            "GET / HTTP/1.0\015\012"
                + "Header1: value1\015\012"
                + "Header2  :   value 2a  \015\012"
                + "                    value 2b  \015\012"
                + "Header3: \015\012"
View Full Code Here

Examples of org.mortbay.io.bio.StringEndPoint

    }

    public void testChunkParse()
      throws Exception
    {
        StringEndPoint io=new StringEndPoint();
        io.setInput(
            "GET /chunk HTTP/1.0\015\012"
                + "Header1: value1\015\012"
        + "Transfer-Encoding: chunked\015\012"
                + "\015\012"
                + "a;\015\012"
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.