- Added an overridable `onConnectionClosed()` that is called when the connection is closed by either us or the remote host
- Added `closedConnectionHandler()` (gonna get rid of soon)
- Calling `disconnect()` will now RATHER shutdown the socket than close it, it no longer performs any other sub-systems clean up
- Implemented `doThreadCleanup()` which stops the receive and send managers, stops the eventy engine too
- At every `read()` we do in the reader loop, check if the return value is `<0` or `==0` in which case set the running state to false and exit the loop
- The exiting of the reader loop will now shutdown the socket (in case remote host caused it and not us (via `disconnect()` for example) ), `close()` the socket and call `doThreadCleanup()`
- Now catches `SnoozeError` if a the libsnooze `Event`'s failed to have their `ensure()` call succeed
ErrorType
- Updated description for enum member `INTERNAL_FAILURE`
Sender
- Removed now-completed TODO
Receiver
- Removed now-completed TODO
- Documented that `initEvents()` may throw an `EventyException`
ErrorType
- Added new member `INTERNAL_FAILURE` which could occur from errors with `Eventy` when setting up the signal handlers and event types
- Catch more specific exception, `FatalException` rather than `SnoozeError`
- Adjusted error message printed out in unittest-builds on occurence of such an exception
Sender
- Catch more specific exception, `FatalException` rather than `SnoozeError`
- Adjusted error message printed out in unittest-builds on occurence of such an exception
- When `wait()` has an `InterruptedException` then go back to the loop again (retry the `wait()`)
- On `SnoozeError` (for now) we also do the same even though we should stop the loop
Receiver
- When `wait()` has an `InterruptedException` then go back to the loop again (retry the `wait()`)
- On `SnoozeError` (for now) we also do the same even though we should stop the loop
Dub
- Upgraded to `libsnooze` version `1.0.0-beta`
- Made field `nickname` public
- Added public fields `username` and `realname`
- Updated constructor to take in additional parameters `username` and `realname`
Client
- Calling `connect()` on a `Client` object will now call `doAuth()` which will do `/NICK` and `/USER` for you automatically (no need to do it manually anymore)
- The newly added `doAuth()` will take `hostname=username` from `connInfo.username`, it will set `servername` to `"bogus.net"` and `realname==connInfo.realname`
- Added `user(username, hostname, servername, realname)`
- Just import `birchwood.config` package rather
- Call `setDefaults(this.connInfo)` to assign default `db` values
- `nick(string)` will now fetch the maximum nickname length and ensure the provided nickname is in said bounds, if not then a `BirchwoodException` with `ErrorType` `NICKNAME_TOO_LONG` is thrown
Unit tests
- Updated unit test to test the updated value of `MAXNICKLEN` (which on BonoboNET is 30)