def on_server_connect(obj=nil, &block)
      @on_server_connect_obj = obj
      @on_server_connect = Proc.new { |handle, obj_ptr|
        yield self, object_for(obj_pointer)
      }
      Klass.set_OnServerConnect_Handler(@handle, @on_server_connect, pointer_for(obj))
    end
def on_server_connect(obj=nil, &block)
      @on_server_connect_obj = obj
      @on_server_connect = Proc.new { |handle, obj_ptr|
        yield self, object_for(obj_pointer)
      }
      Klass.set_OnServerConnect_Handler(@handle, @on_server_connect, pointer_for(obj))
    end
Sets a server connect handler callback function. This is used for opening the PhidgetManager remotely, and is called when a connection to the server has been made.

 @param [String] obj Object to pass to the callback function. This is optional.
 @param [Proc] Block When the callback is executed, the device and object are yielded to this block.
 @example
     manager.on_server_connect do |obj|
        puts 'Connected'
     end
 As this runs in it's own thread, be sure that all errors are properly handled or the thread will halt and not fire any more.
 @return [Boolean] returns true or raises an error