 platform = require './Platform'
 
 class InPort extends BasePort
-  constructor: (options, process) ->
-    @process = null
-
-    if not process and typeof options is 'function'
-      process = options
-      options = {}
-
+  constructor: (options) ->
     options ?= {}
 
     options.buffered ?= false

    options.scoped ?= true
    options.triggering ?= true

    if not process and options and options.process
      process = options.process
      delete options.process

    if process
      platform.deprecated 'InPort process callback is deprecated. Please use Process API or the InPort handle option'
      unless typeof process is 'function'
        throw new Error 'process must be a function'
      @process = process

    if options.handle
      platform.deprecated 'InPort handle callback is deprecated. Please use Process API'

      @handleIP ip, localId

  handleIP: (ip, id) ->
    return if @options.control and ip.type isnt 'data'
    ip.owner = @nodeInstance
    ip.index = id if @isAddressable()
