Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.1.0
-
Fix Version/s: 3.2.0
-
Component/s: Extensions
-
Labels:None
-
Acceptance Test - Add?:No
Description
XEP-0065 (http://xmpp.org/extensions/xep-0065.html#proto-inform) says if client supports Socks5 bytestream it MUST answer to Socks5 bytestream requests by either accepting or rejecting it.
- added Socks5BytestreamManager to startup classes in smack-config.xml
- Socks5BytestreamManager initializes Socks5 bytestream feature and InitiationListener that listens for all incoming Socks5 bytestream requests
- Socks5BytestreamManager has methods to add or remove IncomingByteStreamListener that will be notified on incoming requests
- InitiationListener rejects all requests if no IncomingByteStreamListener are registered
- if IncomingByteStreamListener are registered a Socks5BytestreamRequest is created and passed to the listeners
- ErrorIQ class for convenience to reply to a packet with an error (there was no IQ subclass with no child elements)
- contains tests for ErrorIQ and InitiationListener
Issue Links
- is related to
-
SMACK-319
Add common interfaces for SOCKS5 Bytestreams and In-Band Bytestreams
-
First of all thanks for your work! I like that you introduce a new package for socks5 bytestreams
I've one design question. Why do you introduce the InitiationListener class?
In my opinion this class seems to be closely related to Socks5ByteStreamManager. Maybe it make sense to integrate it and to have all related functions wihtin one class?
I know more packages and classes use their own implementation to create error or empty IQ result packages, but in my opinion we should instead
improve the IQ API to create empty IQ results or IQ errors and reuse it. So I would suggest to remove ErrorIQ because it isn't bytestream specific. I've created
SMACK-304to reflect this.I think I've found a memory leak for Socks5ByteStreamManager if a implementation creates many connections (and for each connection a ByteStreamManager is created but never removed if the connection is closed).
Use the test folder for integration testing against an Openfire server and the test-unit directory for unit tests.
I would favour bytestream as package name instead of socks5bytestream and ByteStreamManager instead of Socks5ByteStreamManager but maybe thats only my taste