def initWithDelegate_port_protocol_(self, cb_obj, port, proto):
self = super(_ChannelServerEventListener, self).init()<EOL>if cb_obj is None:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>self.__cb_obj = cb_obj<EOL>self.__usernotif = None<EOL>if proto == _lightbluecommon.RFCOMM:<EOL><INDENT>usernotif = _IOBluetooth.IOBluetoothRFCOMMChannel.registerForChannelOpenNotifications_selector_withChannelID_direction_(self, "<STR_LIT>", port, _macutil.kIOBluetoothUserNotificationChannelDirectionIncoming)<EOL><DEDENT>elif proto == _lightbluecommon.L2CAP:<EOL><INDENT>usernotif = _IOBluetooth.IOBluetoothL2CAPChannel.registerForChannelOpenNotifications_selector_withPSM_direction_(self, "<STR_LIT>", port, _macutil.kIOBluetoothUserNotificationChannelDirectionIncoming)<EOL><DEDENT>if usernotif is None:<EOL><INDENT>raise _socket.error("<STR_LIT>" +"<STR_LIT>" %port)<EOL><DEDENT>self.__usernotif = usernotif<EOL>return self<EOL>
Arguments:
- cb_obj: to receive callbacks when a client connects to
  to the channel, the callback object should have a method
  '_handle_channelopened' which takes the newly opened
  IOBluetoothRFCOMMChannel or IOBluetoothL2CAPChannel as its argument.
- port: the channel or PSM that the server is listening on
- proto: L2CAP or RFCOMM.