org.jetlang.web

## Interface WebSocketHandler<S,T>

    public interface WebSocketHandler<S,T>

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`void` `onBinaryMessage(WebSocketConnection connection, T state, byte[] result, int size)`
`void` `onClose(WebSocketConnection connection, T state)`
`void` `onError(WebSocketConnection connection, T state, String msg)`
`void` `onException(WebSocketConnection connection, T state, Exception failed)`
`void` `onMessage(WebSocketConnection connection, T state, String msg)`
`T` `onOpen(WebSocketConnection connection, HttpRequest headers, S sessionState)`
`default void` `onPing(WebSocketConnection connection, T state, byte[] result, int size, StringDecoder charset)`
`default void` `onPong(WebSocketConnection connection, T state, byte[] result, int size)`

### Method Detail

#### onOpen

    T onOpen(WebSocketConnection connection,
             HttpRequest headers,
             S sessionState)

#### onMessage

    void onMessage(WebSocketConnection connection,
                   T state,
                   String msg)

#### onClose

    void onClose(WebSocketConnection connection,
                 T state)

#### onError

    void onError(WebSocketConnection connection,
                 T state,
                 String msg)

#### onException

    void onException(WebSocketConnection connection,
                     T state,
                     Exception failed)

#### onBinaryMessage

    void onBinaryMessage(WebSocketConnection connection,
                         T state,
                         byte[] result,
                         int size)

#### onPing

    default void onPing(WebSocketConnection connection,
                        T state,
                        byte[] result,
                        int size,
                        StringDecoder charset)

#### onPong

    default void onPong(WebSocketConnection connection,
                        T state,
                        byte[] result,
                        int size)