import {Socket} from 'net'
import {SocketError} from './utils'

export interface ExecuteReqeustError extends SocketError {
  addr: string
  port: number
  atyp: any
}

export interface ExecuteRequestArgs {
  requestBuffer: Buffer
  dst: {
    addr: string
    port: number
  }
  atyp: any
}

export interface ExecuteRequestParameters {
  originalSocket: Socket
  addressType: number
  address: string
  port: number
  requestBuffer: Buffer
  end: (rpcReply: number, args: {requestBuffer: Buffer}) => void
  onError: (error: ExecuteReqeustError) => void
  onConnect: (destination: Socket) => void
}
