// package: nanoapp.std.socket
// file: socket.proto

import * as jspb from "google-protobuf";

export class ConnID extends jspb.Message {
  getId(): number;
  setId(value: number): void;

  hasPeer(): boolean;
  clearPeer(): void;
  getPeer(): PeerInfo | undefined;
  setPeer(value?: PeerInfo): void;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): ConnID.AsObject;
  static toObject(includeInstance: boolean, msg: ConnID): ConnID.AsObject;
  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
  static serializeBinaryToWriter(message: ConnID, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): ConnID;
  static deserializeBinaryFromReader(message: ConnID, reader: jspb.BinaryReader): ConnID;
}

export namespace ConnID {
  export type AsObject = {
    id: number,
    peer?: PeerInfo.AsObject,
  }
}

export class PeerInfo extends jspb.Message {
  getAddress(): string;
  setAddress(value: string): void;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): PeerInfo.AsObject;
  static toObject(includeInstance: boolean, msg: PeerInfo): PeerInfo.AsObject;
  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
  static serializeBinaryToWriter(message: PeerInfo, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): PeerInfo;
  static deserializeBinaryFromReader(message: PeerInfo, reader: jspb.BinaryReader): PeerInfo;
}

export namespace PeerInfo {
  export type AsObject = {
    address: string,
  }
}

export class ConnData extends jspb.Message {
  getId(): number;
  setId(value: number): void;

  getData(): Uint8Array | string;
  getData_asU8(): Uint8Array;
  getData_asB64(): string;
  setData(value: Uint8Array | string): void;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): ConnData.AsObject;
  static toObject(includeInstance: boolean, msg: ConnData): ConnData.AsObject;
  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
  static serializeBinaryToWriter(message: ConnData, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): ConnData;
  static deserializeBinaryFromReader(message: ConnData, reader: jspb.BinaryReader): ConnData;
}

export namespace ConnData {
  export type AsObject = {
    id: number,
    data: Uint8Array | string,
  }
}

export class SocketAddress extends jspb.Message {
  getProtocol(): string;
  setProtocol(value: string): void;

  getAddress(): string;
  setAddress(value: string): void;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): SocketAddress.AsObject;
  static toObject(includeInstance: boolean, msg: SocketAddress): SocketAddress.AsObject;
  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
  static serializeBinaryToWriter(message: SocketAddress, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): SocketAddress;
  static deserializeBinaryFromReader(message: SocketAddress, reader: jspb.BinaryReader): SocketAddress;
}

export namespace SocketAddress {
  export type AsObject = {
    protocol: string,
    address: string,
  }
}

