Languages Java Layers  

a sample TCP

download download  
important code information
author:
raxix
minimum requirements:
a sample TCP description

This code shows a simple TCP which has checksum, error control, packet loss and simulation for a random network. You can give the time slice, packet loss, corrupt packet, and random number range. The time slice indicates the time it takes the packet to reach from A_side(client) to B_Side(server), the more the packet loss probability the more packets will be lost before send to the server. The higher the packet corrupt probability the more packets will be corrupted before send to the server. If random seed is high, the range of random number generated will be more. It will be easier for you to trace the program if the range is less. ex: 5. Try to use a timer value about 1000 if you want to send the message from client to server.


This code shows a simple TCP which has checksum, error control, packet loss and simulation for a random network.
You can give the time slice, packet loss, corrupt packet, and random number range. The time slice indicates the time
it takes the packet to reach from A_side(client) to B_Side(server), the more the packet loss probability the more
packets will be lost before send to the server. The higher the packet corrupt probability the more packets will be
corrupted before send to the server. If random seed is high, the range of random number generated will be more. It
will be easier for you to trace the program if the range is less. ex: 5. Try to use a timer value about 1000 if you
want to send the message from client to server.

I believe there is a problem with the timer. It is not a real timer but it gives a general idea of how it should be
working. When I did this assignment I couldn't make the timer work as I wanted so I use random numbers.

Don't forget to change the IP in A_side code. Write the B_side IP address there.

You can do what ever you want to do with the program.
Enjoy the code.



File List:
@PSC_ReadMe_2630_2.txt1Kb
A_Side.class6Kb
A_Side.java6Kb
B_Side.class4Kb
B_Side.java3Kb
readMe.txt1Kb

Similar code
Multi-Threaded Server (Popularity: ) : To implement the concept of multi threaded Data-server, that respond and handel multiple clients by assigning each a single thread. This also implements JDBC for retrieving data through database as requested by client.
Thumb Plus (Popularity: ) : Thumb Plus is a Script, that views small pictures on a webpage, but when you click on it, the big picture is showed. When you click on the big picture, it will be closed, and you will see the Webpage. ...
Three-Tier Application (Popularity: ) : A simple 3-tier application using Client, Server and DataServer
Hide Combos Under DIV For IE (Popularity: ) : Hide select boxes under DIV. This can be used to prevent comboboxes look through (make holes) in DIV tags in Internet Explorer. This is useful when designing floating menus or other DHTML effects .This function need only work in IE.
Image Zoom Out (Popularity: ) : In this Script when you move you click on the following image, the image size will decrease gradually (i.e the image will zoom out) and will finally disappear. The script is very easy to customize. Here the event that calls ...
BasicClientServer (Popularity: ) : Implement basic client-server communication
Stationary Field (Popularity: ) : Fully customizable layer that stays put. Using JS,CSS,and DHTML it stays in its spot, rigidly hovering over it's place. Can be put anywhere on the page and can handle all HTML as long as its placed in the right spot. ...
Scrolling Image (Popularity: ) : Using this script you can scroll an image in the "left" or "right" direction.
Dynamic Port Binder (Popularity: ) : To implement the concept of Dynamic Port Binder using two-tier application. Client will scan for desired server ports at run time and establish connection.
Floating email sender (Popularity: ) : This is a simple floating layer tht always stys in view. Visitors can send you email by clicking on it. You could replcae this with any other suitable picture or advert. Cookies can be set by user to prevent repeat ...
User reviews

Write a review:
1 2 3 4 5 6 7 8 9 10
1=poor 10=excellent
Write review*
Your name*
Email*
  (Comments are moderated, and will not appear on this site until the editor has approved them)
 
Rate me
supported os
stats
downloads 180
version
size in Kb 11
popularity   2037/7913374
user rating 2/10
ad


New Code
Popular Code