Re: java-server-socket-binding-multiple-domain-host-names

2013-05-25 Thread Elgs Chen
Yes, .getLocalAddress().getHostName() is not reliable. I don't assume the connection to be an HTTP connection. Probably I will set a new flag like allowPeep: true to request peeping into the header information if the users know that they are using HTTP for this connection. However, I'm afraid it

Re: java-server-socket-binding-multiple-domain-host-names

2013-05-25 Thread Enrico Olivelli
If you are using HTTP then clients will politely tell you which DNS name they are tryning to connect to using the "host:" header. TCP does not give any info about "hostnames", but only about "IP Addresses" I think .getLocalAddress().getHostName() will simply try to resolve back the IP address to

Re: [OT] Re: java-server-socket-binding-multiple-domain-host-names

2013-05-25 Thread Elgs Qian Chen
Thanks Mark. Actually I have problem with Apache2 proxy module when the backend is a wesocket server. I have written my own TCP proxy/port mapper, however, it maps only one client to one server. Now I think maybe I have to hack into the http protocol by reading a little bit from a client reque

[OT] Re: java-server-socket-binding-multiple-domain-host-names

2013-05-25 Thread Mark Thomas
On 25/05/2013 17:23, Elgs Chen wrote: > Hi Mark, > > I'm very sorry I know this is not related to the Tomcat project. Then mark the thread as off-topic and use the users mailing list. > However, I cannot find anyone who I think has more expertise in java > networking programming than you. Then