Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#23 Hostname length lower than 7 characters are not allowed

open
Abhik Sarkar
None
5
2012-10-26
2009-08-06
Zsido Jozsef
No

If one tries to call the constructor TCPIPConnection(String address, int port) with a hostname shorter than 7 characters, it is considered invalid hostname and connects to localhost.
The constraint is without any reason because a construct new TCPIPConnection("smpp", 7890) is legal and valid and must connect to the addres resolved for "smpp".
Fortunately there is a constructor which permits the creation of TCPIPConnection with a connected socket instance.

Discussion

  • Abhik Sarkar
    Abhik Sarkar
    2009-09-23

    Hi Zsido,

    Thanks for raising this. I'll have a look into it and update the ticket soon.

    Abhik

     
  • Abhik Sarkar
    Abhik Sarkar
    2009-11-17

    It seems that the original coder made the assumption that the address will always be an IP address. As a result, the minimum length is 7 characters ("w.x.y.z"). This should be corrected and will be done soon (hopefully ;)).