Package org.xsocket.connection

Examples of org.xsocket.connection.IDataHandler


   
   
    @Test
    public void testManualConnectionContinueHeaderUnexpectedResponse() throws Exception {
       
        IDataHandler dh = new IDataHandler() {
           
            private int state = 0;
            private int size = 0;
           
            public boolean onData(INonBlockingConnection connection) throws IOException {
View Full Code Here


   
  @Test
  public void testUnexpectedContinue() throws Exception {


    IDataHandler dataHandler = new IDataHandler() {
     
      public boolean onData(INonBlockingConnection connection) throws IOException, BufferUnderflowException, ClosedChannelException, MaxReadSizeExceededException {

        connection.readStringByDelimiter("\r\n\r\n");
       
View Full Code Here


  @Test
  public void testMultithreaded() throws Exception {

      IDataHandler dh = new IDataHandler() {
         
          public boolean onData(INonBlockingConnection connection) throws IOException, BufferUnderflowException, ClosedChannelException, MaxReadSizeExceededException {
              connection.readStringByDelimiter("\r\n\r\n");
              connection.write("HTTP/1.1 200 OK\r\n" +
                               "Content-Length: 5\r\n" +
View Full Code Here

 
 
  @Test
    public void testMultithreadedException() throws Exception {
       
        IDataHandler dh = new IDataHandler() {
           
            public boolean onData(INonBlockingConnection connection) throws IOException, BufferUnderflowException, ClosedChannelException, MaxReadSizeExceededException {
                connection.readStringByDelimiter("\r\n\r\n");
                connection.write("HTTP/1.1 200 OK\r\n" +
                                 "Conte");
View Full Code Here

   
 
  @Test
    public void testMultithreadedTimoutException() throws Exception {
       
        IDataHandler dh = new IDataHandler() {
           
            public boolean onData(INonBlockingConnection connection) throws IOException, BufferUnderflowException, ClosedChannelException, MaxReadSizeExceededException {
                // do nothing
                return false;
            }
View Full Code Here

 

    @Test
    public void testNonthreaded() throws Exception {

        IDataHandler dh = new IDataHandler() {
           
            public boolean onData(INonBlockingConnection connection) throws IOException, BufferUnderflowException, ClosedChannelException, MaxReadSizeExceededException {
                connection.readStringByDelimiter("\r\n\r\n");
                connection.write("HTTP/1.1 200 OK\r\n" +
                                 "Content-Length: 5\r\n" +
View Full Code Here

 
   
    @Test
    public void testNonthreadedException() throws Exception {
       
        IDataHandler dh = new IDataHandler() {
           
            public boolean onData(INonBlockingConnection connection) throws IOException, BufferUnderflowException, ClosedChannelException, MaxReadSizeExceededException {
                connection.readStringByDelimiter("\r\n\r\n");
                connection.write("HTTP/1.1 200 OK\r\n" +
                                 "Conte");
View Full Code Here

   
   
    @Test
    public void testNonthreadedTimoutException() throws Exception {
       
        IDataHandler dh = new IDataHandler() {
           
            public boolean onData(INonBlockingConnection connection) throws IOException, BufferUnderflowException, ClosedChannelException, MaxReadSizeExceededException {
                // do nothing
                return false;
            }
View Full Code Here

   

  @Test
  public void testNoCache() throws Exception {

      IDataHandler dh = new IDataHandler() {
       
          public boolean onData(INonBlockingConnection connection) throws IOException {
              connection.readStringByDelimiter("\r\n\r\n");
              connection.write("HTTP/1.1 302 Found\r\n" +
                               "Date: Wed, 23 Sep 2009 18:57:37 GMT\r\n" +
View Full Code Here

 
 
    @Test
    public void testCache() throws Exception {

        IDataHandler dh = new IDataHandler() {
         
            public boolean onData(INonBlockingConnection connection) throws IOException {
                connection.readStringByDelimiter("\r\n\r\n");
                connection.write("HTTP/1.1 302 Found\r\n" +
                                 "Date: Wed, 23 Sep 2009 18:57:37 GMT\r\n" +
View Full Code Here

TOP

Related Classes of org.xsocket.connection.IDataHandler

Copyright © 2018 www.massapicom. 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.