--- /dev/null
+<?php
+/**
+ * An interface for socket discovery
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface Discoverable extends FrameworkInterface {
+}
+
+// [EOF]
+?>
+++ /dev/null
-<?php
-/**
- * An interface for socket discovery
- *
- * @author Roland Haeder <webmaster@shipsimu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-interface DiscoverableDhtRecipient extends FrameworkInterface {
- /**
- * Resolves one or more recipients for a DHT transfer by given package data.
- *
- * @param $packageData Valid package data array
- * @return $recipients An indexed array with DHT recipients
- */
- function resolveRecipientsByPackageData (array $packageData);
-}
-
-// [EOF]
-?>
+++ /dev/null
-<?php
-/**
- * An interface for recipient discovery
- *
- * @author Roland Haeder <webmaster@shipsimu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-interface DiscoverableNodeRecipient extends FrameworkInterface, IteratorAggregate {
- /**
- * Tries to discover all recipients for given package data
- *
- * @param $packageData Raw package data array
- * @return void
- */
- function discoverRecipients (array $packageData);
-
- /**
- * Tries to discover all recipients by given decoded package data.
- *
- * @param $decodedData Raw raw package data array
- * @return void
- */
- function discoverRawRecipients (array $decodedData);
-
- /**
- * "Getter" for recipient iterator
- *
- * @return $iteratorInstance An instance of a Iterateable object
- */
- function getIterator ();
-
- /**
- * Clears all recipients for e.g. another package to deliver
- *
- * @return void
- */
- function clearRecipients ();
-}
-
-// [EOF]
-?>
+++ /dev/null
-<?php
-/**
- * An interface for socket discovery
- *
- * @author Roland Haeder <webmaster@shipsimu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-interface DiscoverableSocket extends FrameworkInterface {
- /**
- * Tries to discover the right socket for given package data and returns a
- * matching socket resource.
- *
- * @param $packageData Raw package data array
- * @param $connectionType Type of connection, can be 'incoming' or 'outgoing', *NEVER* 'server'!
- * @return $socketResource A valid socket resource
- * @throws NoListGroupException If the procol group is not found in peer list
- * @throws NullPointerException If listenerInstance is NULL
- */
- function discoverSocket (array $packageData, $connectionType);
-}
-
-// [EOF]
-?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An interface for socket discovery
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface DiscoverableDhtRecipient extends Discoverable {
+ /**
+ * Resolves one or more recipients for a DHT transfer by given package data.
+ *
+ * @param $packageData Valid package data array
+ * @return $recipients An indexed array with DHT recipients
+ */
+ function resolveRecipientsByPackageData (array $packageData);
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An interface for recipient discovery
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface DiscoverableNodeRecipient extends Discoverable, IteratorAggregate {
+ /**
+ * Tries to discover all recipients for given package data
+ *
+ * @param $packageData Raw package data array
+ * @return void
+ */
+ function discoverRecipients (array $packageData);
+
+ /**
+ * Tries to discover all recipients by given decoded package data.
+ *
+ * @param $decodedData Raw raw package data array
+ * @return void
+ */
+ function discoverRawRecipients (array $decodedData);
+
+ /**
+ * "Getter" for recipient iterator
+ *
+ * @return $iteratorInstance An instance of a Iterateable object
+ */
+ function getIterator ();
+
+ /**
+ * Clears all recipients for e.g. another package to deliver
+ *
+ * @return void
+ */
+ function clearRecipients ();
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An interface for socket discovery
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface DiscoverableSocket extends Discoverable {
+ /**
+ * Tries to discover the right socket for given package data and returns a
+ * matching socket resource.
+ *
+ * @param $packageData Raw package data array
+ * @param $connectionType Type of connection, can be 'incoming' or 'outgoing', *NEVER* 'server'!
+ * @return $socketResource A valid socket resource
+ * @throws NoListGroupException If the procol group is not found in peer list
+ * @throws NullPointerException If listenerInstance is NULL
+ */
+ function discoverSocket (array $packageData, $connectionType);
+}
+
+// [EOF]
+?>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class BaseHubDiscovery extends BaseDiscovery {
+class BaseHubDiscovery extends BaseDiscovery implements Discoverable {
/**
* Protected constructor
*
/*
* Prepare the compressor for our package, ZLIB should be fine but we
* keep it open here so you can experiment with the settings and don't
- * need to touch any code.
+ * need to touch this code.
*/
$compressorInstance = self::createObjectByConfiguredName('raw_package_compressor_class');