// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file is autogenerated by:
//     mojo/public/tools/bindings/mojom_bindings_generator.py
// For:
//     mojo/services/network/public/interfaces/web_socket.mojom
//

package org.chromium.mojom.mojo;

public interface WebSocket extends org.chromium.mojo.bindings.Interface {

    public static final short ABNORMAL_CLOSE_CODE = (short) 1006L;

    public static final class MessageType {
    
        public static final int CONTINUATION = 0;
        public static final int TEXT = CONTINUATION + 1;
        public static final int BINARY = TEXT + 1;
    
        private MessageType() {}
    
    }

    public interface Proxy extends WebSocket, org.chromium.mojo.bindings.Interface.Proxy {
    }

    Manager<WebSocket, WebSocket.Proxy> MANAGER = WebSocket_Internal.MANAGER;

    void connect(String url, String[] protocols, String origin, org.chromium.mojo.system.DataPipe.ConsumerHandle sendStream, WebSocketClient client);

    void send(boolean fin, int type, int numBytes);

    void flowControl(long quota);

    void close(short code, String reason);
}

