I am developing a client server socket application for which I want to simulate the packet data transfer.I want a simulator which simulates the dropped packets data, message statuses, calculating packet checksum etc. Is it possible to simulate a TCP layer? If possible please provide me some links. Thanks in advance.
Share
If you want to test it on a machine by itself, use 127.0.0.1 or localhost as the address you connect to. Your socket will then connect to whatever is listening to that port on your local computer (presumably your test server).
If you want to avoid TCP entirely for some reason and only use the streaming aspect of TCP you could replace the input and output streams by PipedInputStream and PipedOutputStream: