Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestServer.java doesn't work #6

Open
artemik opened this issue Aug 18, 2017 · 1 comment
Open

TestServer.java doesn't work #6

artemik opened this issue Aug 18, 2017 · 1 comment

Comments

@artemik
Copy link

artemik commented Aug 18, 2017

Software caused connection abort: socket write error

Exception in thread "main" java.net.SocketException: Software caused connection abort: socket write error
	at java.net.SocketOutputStream.socketWrite0(Native Method)
	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:134)
	at java.io.DataOutputStream.writeInt(DataOutputStream.java:199)
	at jocket.net.ServerJocket.accept(ServerJocket.java:76)
@pcdv
Copy link
Owner

pcdv commented Aug 23, 2017

Sorry, missed the notification. What did you do to get this error? Is it reproducible?

A real socket is used for the handshake between client and server.

Probably your network setup is not compatible with the way the socket is initialized, i.e.

ServerJocket:
srv.bind(new InetSocketAddress(InetAddress.getByName(null), port));

JocketSocket:
Socket s = new Socket(InetAddress.getByName(null), port);

I admit I don't precisely remember why it is initialized this way... After checking this is supposed to return a loopback address. You can try adding constructors that accept an IP address (such as 127.0.0.1 or 0.0.0.0) and call them from TestClient/Server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants