## org.eclipse.jetty.websocket
Class WebSocketConnectionD00

    java.lang.Object
      org.eclipse.jetty.websocket.WebSocketConnectionD00

All Implemented Interfaces:
  Connection, WebSocket.Outbound, WebSocketConnection

    public class WebSocketConnectionD00

extends Object
implements WebSocketConnection

Constructor Summary
`WebSocketConnectionD00(WebSocket websocket, EndPoint endpoint, int draft)`
`WebSocketConnectionD00(WebSocket websocket, EndPoint endpoint, WebSocketBuffers buffers, long timestamp, int maxIdleTime, int draft)`

Method Summary
`void` `closed()`
`void` `disconnect()`
`static byte[]` `doTheHixieHixieShake(long key1, long key2, byte[] key3)`
`void` `fillBuffersFrom(Buffer buffer)`
`long` `getTimeStamp()`
`Connection` `handle()` Handle the connection.
`void` `handshake(HttpServletRequest request, HttpServletResponse response, String origin, String subprotocol)`
`boolean` `isIdle()`
`boolean` `isOpen()`
`boolean` `isSuspended()`
`void` `sendFragment(boolean more, byte opcode, byte[] content, int offset, int length)`
`void` `sendMessage(byte opcode, byte[] content, int offset, int length)`
`void` `sendMessage(byte frame, String content)`
`void` `sendMessage(String content)`
`void` `setHixieKeys(String key1, String key2)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### WebSocketConnectionD00

    public WebSocketConnectionD00(WebSocket websocket,
                                  EndPoint endpoint,
                                  int draft)
                           throws IOException

Throws:
  `IOException`

### WebSocketConnectionD00

    public WebSocketConnectionD00(WebSocket websocket,
                                  EndPoint endpoint,
                                  WebSocketBuffers buffers,
                                  long timestamp,
                                  int maxIdleTime,
                                  int draft)
                           throws IOException

Throws:
  `IOException`

Method Detail

### setHixieKeys

    public void setHixieKeys(String key1,
                             String key2)

### handle

    public Connection handle()
                      throws IOException

  Description copied from interface: `Connection`
  Handle the connection.

  Specified by:
    `handle` in interface `Connection`
  Returns:
    The Connection to use for the next handling of the connection. This allows protocol upgrades and support for CONNECT.
  Throws:
    `IOException`

### isOpen

    public boolean isOpen()

  Specified by:
    `isOpen` in interface `WebSocket.Outbound`

### isIdle

    public boolean isIdle()

  Specified by:
    `isIdle` in interface `Connection`

### isSuspended

    public boolean isSuspended()

  Specified by:
    `isSuspended` in interface `Connection`

### closed

    public void closed()

  Specified by:
    `closed` in interface `Connection`

### getTimeStamp

    public long getTimeStamp()

  Specified by:
    `getTimeStamp` in interface `Connection`

### sendMessage

    public void sendMessage(String content)
                     throws IOException

  Specified by:
    `sendMessage` in interface `WebSocket.Outbound`
  Throws:
    `IOException`
  See Also:
    `WebSocket.Outbound.sendMessage(java.lang.String)`

### sendMessage

    public void sendMessage(byte frame,
                            String content)
                     throws IOException

  Specified by:
    `sendMessage` in interface `WebSocket.Outbound`
  Throws:
    `IOException`
  See Also:
    `WebSocket.Outbound.sendMessage(byte, java.lang.String)`

### sendMessage

    public void sendMessage(byte opcode,
                            byte[] content,
                            int offset,
                            int length)
                     throws IOException

  Specified by:
    `sendMessage` in interface `WebSocket.Outbound`
  Throws:
    `IOException`
  See Also:
    `WebSocket.Outbound.sendMessage(byte, byte[], int, int)`

### sendFragment

    public void sendFragment(boolean more,
                             byte opcode,
                             byte[] content,
                             int offset,
                             int length)
                      throws IOException

  Specified by:
    `sendFragment` in interface `WebSocket.Outbound`
  Throws:
    `IOException`
  See Also:
    `WebSocket.Outbound.sendFragment(boolean, byte, byte[], int, int)`

### disconnect

    public void disconnect()

  Specified by:
    `disconnect` in interface `WebSocket.Outbound`

### fillBuffersFrom

    public void fillBuffersFrom(Buffer buffer)

  Specified by:
    `fillBuffersFrom` in interface `WebSocketConnection`

### doTheHixieHixieShake

    public static byte[] doTheHixieHixieShake(long key1,
                                              long key2,
                                              byte[] key3)

### handshake

    public void handshake(HttpServletRequest request,
                          HttpServletResponse response,
                          String origin,
                          String subprotocol)
                   throws IOException

  Specified by:
    `handshake` in interface `WebSocketConnection`
  Throws:
    `IOException`

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.