// 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/udp_socket.mojom
//

package org.chromium.mojom.mojo;

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

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

    Manager<UdpSocket, UdpSocket.Proxy> MANAGER = UdpSocket_Internal.MANAGER;

    void allowAddressReuse(AllowAddressReuseResponse callback);
    interface AllowAddressReuseResponse extends org.chromium.mojo.bindings.Callbacks.Callback1<NetworkError> { }

    void bind(NetAddress addr, BindResponse callback);
    interface BindResponse extends org.chromium.mojo.bindings.Callbacks.Callback3<NetworkError, NetAddress, org.chromium.mojo.bindings.InterfaceRequest<UdpSocketReceiver>> { }

    void connect(NetAddress remoteAddr, ConnectResponse callback);
    interface ConnectResponse extends org.chromium.mojo.bindings.Callbacks.Callback3<NetworkError, NetAddress, org.chromium.mojo.bindings.InterfaceRequest<UdpSocketReceiver>> { }

    void setSendBufferSize(int size, SetSendBufferSizeResponse callback);
    interface SetSendBufferSizeResponse extends org.chromium.mojo.bindings.Callbacks.Callback1<NetworkError> { }

    void setReceiveBufferSize(int size, SetReceiveBufferSizeResponse callback);
    interface SetReceiveBufferSizeResponse extends org.chromium.mojo.bindings.Callbacks.Callback1<NetworkError> { }

    void negotiateMaxPendingSendRequests(int requestedSize, NegotiateMaxPendingSendRequestsResponse callback);
    interface NegotiateMaxPendingSendRequestsResponse extends org.chromium.mojo.bindings.Callbacks.Callback1<Integer> { }

    void receiveMore(int datagramNumber);

    void sendTo(NetAddress destAddr, byte[] data, SendToResponse callback);
    interface SendToResponse extends org.chromium.mojo.bindings.Callbacks.Callback1<NetworkError> { }
}

