M
M
Masteron2016-05-29 19:22:49
Java
Masteron, 2016-05-29 19:22:49

Socket server and white ip?

Yesterday I bought a white address from the provider, and decided to connect to the server, as a result, nothing happens.
It seems that I am doing everything right:
(I start the server and listen on the port)
In the client, I specify the address (which was given to me by the provider, that is, white) and the port that is on the server.

Socket fromServer = new Socket(ip, port);
  ObjectOutputStream out = new ObjectOutputStream(fromServer.getOutputStream());
  ObjectInputStream in = new ObjectInputStream(fromServer.getInputStream());

What am I doing wrong? (Everything works on the local network)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2016-05-29
@Masteron

Do you happen to have everything going through the router?
Or is the network cable from the provider directly plugged into the server?
Or port forwarding configured?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question