Roland Häder [Mon, 2 Nov 2020 15:34:20 +0000 (16:34 +0100)]
Continued:
- isIncomingSocketRegistered() now requires a Listenable instance as parameter
- further fixes for receiving raw package data. It seem to be a race-condition?
- updated core framework
Roland Häder [Tue, 27 Oct 2020 20:18:40 +0000 (21:18 +0100)]
Continued:
- renamed $unlInstance to $locatorInstance
- implemented findNodeByUniversalNodeLocator()
- WIP: started implementing looking up session id by UNL (internal or external)
Roland Häder [Tue, 27 Oct 2020 12:28:04 +0000 (13:28 +0100)]
Continued:
- moved socketResource from 'core' project to SocketContainer class
- added more debug lines
- fixed comments for $packageData (array) to $packageInstance transition
- updated core framework
Roland Häder [Tue, 27 Oct 2020 09:57:57 +0000 (10:57 +0100)]
Continued:
- renamed packageInstance -> handlerInstance as this is no longer the package
but the handler of the package
- added some debug lines
- 'fake' package status removed
Roland Häder [Tue, 27 Oct 2020 09:12:33 +0000 (10:12 +0100)]
Continued:
- There was some mixing of recipient type (direct, dht, self, upper, ...)
with the node's (recipient's) session id. This is now fixed and sorted out.
So the recipient type remains that way and is never being changed to session
id.
Roland Häder [Mon, 26 Oct 2020 10:01:11 +0000 (11:01 +0100)]
Continued:
- renamed *ByPackageData to *ByPackageInstance
- renamed more old-lost remains of $packageData (removed type-unsafe array) with
modern and type-safe $packageInstance
Roland Häder [Mon, 26 Oct 2020 04:38:00 +0000 (05:38 +0100)]
Continued:
- Implemented SocketContainer::bindSocketToFile()
- ops, needs to be listenPort and not listenAddress again
- socketType is not yet know in constructor, this will be later set
- updated core framework
Roland Häder [Mon, 26 Oct 2020 04:16:26 +0000 (05:16 +0100)]
Continued:
- $this and $this->getSocketResource() can be reduced to $this only and let the
exception's code invoke the getter method.
- Removed deprecated $socketData array, this info is now fully stored in $this
already
Roland Häder [Mon, 26 Oct 2020 03:54:19 +0000 (04:54 +0100)]
Continued:
- SocketContainer->bindSocketTo() is now split into bindSocketToFile() and
bindSocketToListener()
- also fixed wrong getter/setter invocation
Roland Häder [Mon, 26 Oct 2020 00:16:37 +0000 (01:16 +0100)]
Continued:
- Let's keep nodeInstance as a class field to avoid tons of invocations of the
factory method. It is a bit of a trade-off, as the memory foot-print may
raise but so does performance and invocations may lower resulting in better
performance.
Roland Häder [Sun, 25 Oct 2020 12:27:11 +0000 (13:27 +0100)]
Continue:
- removed all deprecated SOCKET_ARRAY_INDEX_* constants with proper setter
invocations, still most are not implemented yet
- needed to make setListerInstance() public
Roland Häder [Thu, 1 Aug 2019 06:32:34 +0000 (08:32 +0200)]
Continued:
- more rewrites of $packageData array to PackageData class ($packageInstance)
- renamed NetworkPackage to NetworkPackageHandler and moved to proper namespace
- updated 'core'
Roland Häder [Tue, 13 Nov 2018 23:36:02 +0000 (00:36 +0100)]
Continued: (finally!)
- updated different (!) copyright years to 2018 ...
- added missing "imports"
- added debug lines
- added output current protocol name in base decorator class
- added support for ip:port in NetworkPackage class (was only partly there)
- added namespaces to config entries
- possible fix is now included for self-connect bug
Roland Häder [Sun, 8 Jul 2018 06:58:33 +0000 (08:58 +0200)]
Continued:
- introduced NodeLocatorUtils to avoid monolithic code style
- avoided abusing exceptions for program flow control (don't do that) by
pre-checking conditions and then avoid bad invocations
- updated framework to latest commit
Roland Häder [Sun, 8 Jul 2018 05:07:09 +0000 (07:07 +0200)]
Continued:
- no need for scanner class and task, the URL source class can handle this
- setApplicationName() is no longer needed
- invoke setCommandName() (maybe exists?) instead
- Removed crawler instance from BaseHubSystem
- moved URL source instance from same class to BaseUrlSourceTask
- updated core to latest commit
Roland Häder [Thu, 5 Jul 2018 21:46:14 +0000 (23:46 +0200)]
Continued:
- added missing getter for UNL protocol
- ops, outgoing TCP/UDP/any connections should be set to 'outgoing', not
'server'
- commented out/in debug lines
Roland Häder [Thu, 18 Jan 2018 23:09:51 +0000 (00:09 +0100)]
Continued:
- renamed NodeHelper -> Node and bound it to FrameworkInterface as this is no
node helper (see Helper interface) but the node instance itself
- fixed namespaces in class template files (no real class file, like "class_")
- fixed "new" domain (shipsimu.org, without the dash)
- fixed bug in bad private key's hash
- need to create a dummy array with node data when node is starting first time
(no data in db/node_data/ )
- started (unfinished) fixing assertions
- updated core framework to latest commit
Roland Häder [Wed, 3 Jan 2018 23:44:41 +0000 (00:44 +0100)]
Continued:
- ported crawler sub project to new 'core' framework
- had to copy some setter/getter to base classes where BaseHubSystem was not
inherited from
Roland Häder [Wed, 3 Jan 2018 22:04:33 +0000 (23:04 +0100)]
Continued:
- started porting crawler sub project to new framework
- fixed namespaces for task classes, \Task should always be included
- added commented-out/in debug lines for hub
Roland Häder [Tue, 2 Jan 2018 22:49:06 +0000 (23:49 +0100)]
Continued:
- updated core framework to latest commit
- ported main application to new framework with Tld\Domain\ namespace added
and many many more
- updated .gitignore
- updated .gitattributes
Roland Häder [Sat, 17 Jun 2017 20:39:55 +0000 (22:39 +0200)]
Continued a bit:
- implemented info-filler method with data from socket peer
- implemented enableSocketOutOfBandData()
- commented out many noisy debug lines
- made some debug lines to noisy, as they are really noisy under PHP 7
- some small fixes (e.g. tpzo in method name)
- updated 'core' framework to latest commit
Roland Häder [Tue, 30 May 2017 20:12:23 +0000 (22:12 +0200)]
Continued a bit:
- splitted sender address and port to have both being copyable (needed later on)
to ShareableInfo class
- used some lesser socket_strerr() but socketInstance calls
Roland Häder [Tue, 30 May 2017 19:27:00 +0000 (21:27 +0200)]
Fixes:
- these iterators must be stored separately, else file/tcp/udp socket instances
getting entirely mixed up
- also better splitted configuration entries, some more don't really hurt
- better debug message (info was not really correct)
Roland Häder [Tue, 30 May 2017 15:54:53 +0000 (17:54 +0200)]
Continued:
- added much more debug lines
- UdpListener::initListener() or so, is now rewritten (much untested)
- BaseListener::ifListenerAcceptsPackageData() is now implemented and should
always be used to check if the package's socket protocol is accepted
- imported SocketAlreadyRegisteredException
- imported ShareableInfo
- imported LogicException (and maybe others)
- need to get socket resource from socketInstance
- updated core
Roland Häder [Tue, 30 May 2017 12:00:52 +0000 (14:00 +0200)]
Continued:
- enabled all(?) debug messages
- use StorableSocket::SOCKET_PROTOCOL_FOO instead of 'foo' which is more flexible
- added more debug messages
Roland Häder [Tue, 30 May 2017 09:48:06 +0000 (11:48 +0200)]
Continued:
- start rewriting writing raw data to socket towards StorableSocket
- added more debug messages
- renamed class constants to naming-convention
- rewrote more code to StorableSocket (method writeBufferToSocketByArray() introduced)
- added missing parameter $className
- getConnectionClassNameFromSocket() is now fully rewritten
Roland Häder [Mon, 29 May 2017 20:52:35 +0000 (22:52 +0200)]
Continued:
- implemented translateLastSocketErrorCodeToName()
- implemented getSocketRecipient<Address|Port>()
- no more socketResource here (and elsewhere will follow)
- updated core framework
- more debug messages added
- registering helper/listener instances with socket instance must be done
outaside constructor, much easier code
- for this, registerInfoInstance() is now implemented Signed-off-by: Roland Häder <roland@mxchange.org> Signed-off-by: Roland Häder <roland@mxchange.org>
Roland Häder [Mon, 29 May 2017 19:22:54 +0000 (21:22 +0200)]
Continued:
- method renamed to getConnectionClassNameFromSocket() which now only accepts a StorableSocket class
- resolveStateByPackage() now accepts StorableSocket instead of socket resource
- also extend HubInterface
- introduced BaseHubHandler to implement HubInterface (or what is missing + protected setter/getter)
- introduced BaseHubDatabaseWrapper to implement HubInterface
- more debug messages
- other stuff improved
- imported (Base|Peer)StateResolver
- imported StorableSocket
- imported (Lookupable)PeerState
- imported PeerStateable
- created new namespaces
- moved classes around
Roland Häder [Mon, 29 May 2017 15:59:14 +0000 (17:59 +0200)]
Continued:
- imported HelpableNode
- imported SocketDiscoveryFactory, DiscoverableSocket
- imported ProtocolHandlerFactory
- imported BaseProtocolHandler and made it abstract
- imported BaseIpV4ProtocolHandler and it needs to be abstract
- need to implement setter/getter for protocolName
- added missing namespaces to configuration entries
Roland Häder [Mon, 29 May 2017 15:56:08 +0000 (17:56 +0200)]
More rewrites:
- rewrote more parts towards SocketContainer/StorableStocket class/interface
- still UdpListener is half-finished
- added missing namespace
- imported BaseNodeHelper
Roland Häder [Wed, 24 May 2017 20:04:07 +0000 (22:04 +0200)]
Prepared next step of socket-rewrites:
- instead of direct socket resource, use socket instance (not working now,
die() has been added, too)
- updated core framework
Roland Häder [Mon, 22 May 2017 20:47:55 +0000 (22:47 +0200)]
Continued:
- imported PackageDiscoveryFactory, BaseRecipientDiscovery, DiscoverableRecipient
- imported DiscoverableNodeRecipient, RecipientListFactory, (Base)Recipient
- imported ObjectFactory (opps?)
- imported InvalidSessionIdException (also where it is being caught!)
- imported FrameworkException
- imported BaseIterator
- recipients and not receipt! ;-)
- also they are network-relevant and not generic
- added namespaces to configuration entries
Roland Häder [Mon, 22 May 2017 18:42:34 +0000 (20:42 +0200)]
Continued:
- no more 'base_path', was to unflexible and horribly wrong. Now there are 3
configuration entries:
'root_base_path' - Where index.php has been found
'framework_base_path' - Where the framework is located
'application_base_path' - Where the applications are located (without application name)
- imported FileNotFoundException
- imported DhtObjectFactory
- updated core framework
Roland Häder [Mon, 22 May 2017 17:05:37 +0000 (19:05 +0200)]
Continued:
- imported Distributable
- imported FiLoStacker
- imported BaseState
- imported NodeDistributedHashTableDatabaseWrapper
- created/added namespaces
- setter/getter for DHT instance is no longer working and maybe okay to use
DhtObjectFactory instead. Okay, a few more calls then, but well.
- renamed HubPingIterator -> NodePingIterator
- updated core framework
Roland Häder [Mon, 22 May 2017 16:39:19 +0000 (18:39 +0200)]
Continued:
- ListenerVisitor is not generic (Listenable), re-imported it
- this task is also no longer generic
- added missing namespaces
- imported BaseTask
- imported ChunkHandler(Factory), BaseHandler
- imported PackageFragmenter
- changed namespace
Roland Häder [Mon, 22 May 2017 16:23:17 +0000 (18:23 +0200)]
Cleanup:
- isServerSocketResource() was at the start a good idea, to make sure that only
"server" (listeners) sockets can pass but it was hindering it when it comes
to UDP where there is no connection.
- so let's better remove this method all together
- updated TODOs.txt
Roland Häder [Mon, 22 May 2017 13:25:37 +0000 (15:25 +0200)]
Continued a bit:
- implemented enableSocketReuseAddress()
- imported (Base)Iterator
- added missing namespaces
- created new namespaces (also template)
- cleared up now obsolete code as StorableSocket is now there
- renamed method to listenToSocket()
Roland Häder [Sun, 21 May 2017 21:26:22 +0000 (23:26 +0200)]
Continued:
- Socket protocol names being used are now "abstracted" into constants (interface)
- no need to get last socket error code and then use it only once (per method)
- handle over only array values of packageData array to socket-error handler
- used these new constants more
Roland Häder [Sun, 21 May 2017 20:51:32 +0000 (22:51 +0200)]
Continued rewrite:
- rewrote TcpListener (should be working, untested) towards SocketFactory
- added missing but needed methods in BaseListenerDecorator which extends
BaseDecorator which is framework (generic)
- renamed method to enableSocketReuseAddress() to make it similar to existings
- added missing namespaces
Roland Häder [Sun, 21 May 2017 20:25:26 +0000 (22:25 +0200)]
Continued:
- setter/getter for socket instance is now in BaseListener
- imported StorableSocket
- moved constants to Poolable interface
- updated core framework
Roland Häder [Sun, 21 May 2017 12:39:43 +0000 (14:39 +0200)]
Continued a bit:
- translateSocketErrorCodeToName() is now private, no need to have it publicly
available
- added field socketProtocol
- used StorableSocket (interface) as 'instanceof' test, not a class
- sorted parameters in SocketContainer's factory method
- sorted members
Roland Häder [Sun, 21 May 2017 11:37:33 +0000 (13:37 +0200)]
WIP:
- rewrite from unlData -> unlInstance (still open things)
- moved constants from class to interface LocateableNode
- moved UNL_REGEX to same interface for rewrite of those parse methods. They
should be moved to a factory instead.