Results 1 to 1 of 1
- 09-20-2011, 07:50 PM #1
Member
- Join Date
- Sep 2011
- Posts
- 1
- Rep Power
- 0
How to get IP and port of client in onOpen() method using Jetty's WebSocket?
I just started experimenting with embedding Jetty in a Java application but I can't work out how to get the remote IP and port number of the client in the onOpen method.
According to the javadocs there's no function for getting the endpoint from this connection. Any ideas how to get the IP and port number of the client?Java Code:public class ChatWebSocket implements WebSocket.OnTextMessage, Serializable { public void onOpen(Connection connection) { } }
Thanks
Similar Threads
-
Redirecting port 80 index to port 8080 index
By chyrl in forum Advanced JavaReplies: 0Last Post: 11-30-2010, 03:15 PM -
Client freezes when method is called
By chyrl in forum Advanced JavaReplies: 9Last Post: 07-26-2010, 09:14 PM -
Tomcat to Jetty Migration Guide
By joaojuniorcruz in forum Java ServletReplies: 0Last Post: 07-05-2010, 09:08 PM -
how to handle PORT - - Multithreaded Client UDP
By maribo in forum NetworkingReplies: 9Last Post: 06-16-2010, 08:00 AM -
TCP/IP Client program halts at the read method of the stream
By PradeepBadiger in forum NetworkingReplies: 0Last Post: 03-26-2009, 03:14 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks