*
* @param $connectionType Type of connection, can only be 'incoming', 'outgoing' or 'server'
* @return $sockets An array with sockets of given type
+ * @throws InvalidConnectionTypeException If the provided connection type is not valid
*/
public function getSocketsByConnectionType ($connectionType) {
+ // Is the connection type valid?
+ if (!$this->isValidConnectionType($connectionType)) {
+ // Is not a valid connection type!
+ throw new InvalidConnectionTypeException(array($this, $connectionType), self::EXCEPTION_INVALID_CONNECTION_TYPE);
+ } // END - if
+
// Get the array list
$socketArrays = $this->getArrayFromList('pool');