I am using Java Socket API for communication. But sometime I getting to packet attached in single packet. How can I avoid the same. Is there any method to resolve same ...
I have given Socket soc = new Socket(host,port); Now when the host machine is up and in running state, the socket is getting created immediately.
But when the machine is turned off ...
I am acting as the client and I'm recieving data in blocks from the server. I'm using a regular socket with an InputStreamReader. The problem is that the server sends me loads of points to plot on a graph. Each time I recieve a point I could plot it but I want to wait till I recieve all the data in ...
Hi, im writing a Client/Server application, which are both running on my local machine. The Client connects to the Server and then both start a thread to do the communication. At the end of both threads i close the sockets. But then the socket go into the time_wait state(given by the netstat-programm). Why is this so? This is so even when ...
Hello folks, I have a problem with my client side of UDP. I am not really good at socket programming and I hope that you dont mind helping me out with this! The main idea of this UDP client is to send a packet and receive it back from server! It then takes the time taken from the moment the packet ...
Hi, I wrote a simple Server/Client chat program. But there is a problem Server always write after client writes something and client always write after server writes something. Because in my while loop first takes from other part(Server or Client) then write. But i want to write and read at the same time like Msn messenger. So I wrote this code. ...
I am using two threads. One writes data to an OutpputStream and the other updates a progress bar. The behavior I am observing is such that the file write loop is executed until all data has been transferred and then it waits for a response for another few seconds. All this time (4-5 seconds) the progress bar thread does not wake ...
Hi everybody, I'm trying to write a class using MulticastSocket and DatagramSocket which can send messages to all clients in the same group and receive messages from them. It's basically a chat. The problem is it works for the first 2 messages but after no one is receiving from the others. import java.io.*; import java.net.*; import java.util.Scanner; public class SendAndReceive { ...
I have to do an experiment that needs to measure the transmission time of an amount of data. I write a client-server program in Java using javasocket and use netem to simulate a WAN network by setting the bandwidth and delay (i.e. latency) parameters. I measure the transmission time as follows: Before sending an data object, the client records the current ...