   # can be constructed with more flexibility, as file buffers or
   # message queues can be used as additional packet relay mechanisms.
   send: (data) ->
-    @connect() unless @connected
     data = @dataDelegate() if data is undefined and typeof @dataDelegate is 'function'
-    @emitEvent 'data', data
+    @handleSocketEvent 'data', data
 
   # ## Sending information packets without open bracket
   #

#     (c) 2011-2012 Henri Bergius, Nemein
#     NoFlo may be freely distributed under the MIT license
{EventEmitter} = require 'events'

# ## Internal Sockets
#

  #         # Otherwise, call same method recursively
  #         @readBuffer fd, position, size, buffer
  connect: ->
    @handleSocketEvent 'connect', null

  disconnect: ->
    @handleSocketEvent 'disconnect', null

  isConnected: -> @connected

