Hi everyone, I am working on device which communicate through Tcp sockets, It has an IP address and one port for listening and another for sending the response. Problem is that I am able to create a connection to Device ip+port, and i am trying to listen on the same port while the device is sending the response on other port. ...
You could try and connect to it. I don't understand what you mean by your point (1). (2) is a bit misleading because it it fails you won't have to worry about closing it. I wouldn't do what you are doing though aka the test. Just do it, if it fails with a bind exception you know what that means. But ...
Hello, I'm trying to add to my server an extra port. If i do port.accept() it just waits for connecting to it, that's no problem for one port. But now i would like to add an extra, and can't find much information to handle it. Hope to get some help here, greets.
Surely that would simply read a maximum of 1028 bits then not bother with the rest of the stream unless you include something to test if there is more available. No. Read that javadoc. You should write a loop that calls read in the loop condition, almost like what you had in your first post, but with arrays. You can't use ...
Hi all, I am new to java programming and I need to program a java program that the socket server will open 20 port and keep listening. The client will connect to any of the 20 port and send information. I have tried using array to open the port. however, there is some error. I tried searching the website however those ...
Hi all, I am new to java programming and I need to program a java program that the socket server will open 20 port and keep listening. The client will connect to any of the 20 port and send information. I have tried using array to open the port. however, there is some error. I tried searching the website however those ...
how long does it take for a client to connect to the server.. How long does socket = new Socket( host port); take? I ask because if it takes longer on some computers, my clients wont connect in the correct order.. Example: Client1 is sent to the server then Client2 is sent to the server then Client3 is sent to the ...