       @emit 'attach', socket, index
       return
     @emit 'attach', socket
+    return
 
-  attachSocket: ->
+  attachSocket: -> return
 
   detach: (socket) ->
     index = @sockets.indexOf socket

      @emit 'detach', socket, index
      return
    @emit 'detach', socket

  isAddressable: ->
    return true if @options.addressable
    false

  isBuffered: ->
    return true if @options.buffered
    false

  isRequired: ->
    return true if @options.required
    false

  isAttached: (socketId = null) ->
    if @isAddressable() and socketId isnt null
      return true if @sockets[socketId]
      return false
    return true if @sockets.length
    false

  listAttached: ->
    attached = []
    for socket, idx in @sockets
      continue unless socket
      attached.push idx
    attached

  isConnected: (socketId = null) ->
    if @isAddressable()

    if options.schema and options.schema.indexOf('/') is -1
      throw new Error "Invalid port schema '#{options.schema}' specified. Should be URL or MIME type"

    return options

  getId: ->
    unless @node and @name
      return 'Port'
    return "#{@node} #{@name.toUpperCase()}"

  getDataType: -> return @options.datatype
  getSchema: -> return @options.schema or null
  getDescription: -> return @options.description

  attach: (socket, index = null) ->
    if not @isAddressable() or index is null
