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
Asked
Active
Viewed 1,163 times
0
-
Did you check the docs? – gre_gor Jun 06 '17 at 17:22
-
Yes I did, but when I connect to remote host by hostname (e.g. something.cloud9.io), it logs nothing which means it didn't get the request – Garifullin the Russian Jun 06 '17 at 18:54
1 Answers
2
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 :-

Anshul Sharma
- 3,432
- 1
- 12
- 17