Is it possible to connect to Java WebSocket through flash using server hostname, not IP? The reason is the specifications of Cloud9, they don't give any IPs, only hostnames. Tests showed that WebSocket gets requests to connect through browser, but not from Socket class in Flash
programming for a Client:
Socket MyClient;
try {
MyClient = new Socket("Machine name", PortNumber);
}
catch (IOException e) {
System.out.println(e);
}
programming for a Server:
ServerSocket MyService;
try {
MyServerice = new ServerSocket(PortNumber);
}
catch (IOException e) {
System.out.println(e);
}
for further you can refer below URL :-
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.