Professional Documents
Culture Documents
INDEX
1. Introduction
2. System Analysis
a. Existing System
b. proposed System
3. Feasibility Report
a. Technical Feasibility
b. Operational Feasibility
c. Economical Feasibility
a. Overview
b. Modules Description
c. Process Flow
d. SDLC Methodology
e. Software Requirements
f. Hardware Requirements
5. System Design
a. DFD
b. E-R diagram
TCP-SMART FRAMING
c. UML
d. Data Dictionary
6. Technology Description
7. Coding
9. Output Screens
10. Reports
12. Bibliography
TCP-SMART FRAMING
INTRODUCTION
TCP-SMART FRAMING
SEND THE
FAST
SEGMENTED
SERVER RECOVERING
DATA
Congestion occurrence
TCP-SMART FRAMING
SYSTEM ANALYSIS
TCP-SMART FRAMING
SENDER RECIVER
Wait Time
Wait Time
Sliding Window
after another meaning that the link can carry several frames and
its capacity can be used efficiently. The receiver ack only some of
the frames using a single ACK, it includes the number of the next
frame it expects to receive. The sliding window of the sender
shrinks forms the left when frames of data are sent. The sliding
window of the sender expands to the right when ACK are
received.
1. Congestion detecting
2. Segmentation
3. Fast transmission
4. Fast recovery
Congestion Detecting
When too many packets are contending for same link, the
queue overflows and packets have to be dropped when such a
drop become common events, the network is said to be
congested. The networks provide a congestion detecting
mechanism to deal with following situation
RTT = TS+TR
RTO= RTT/2
Fast Retransmission
Receiv
Sender
Packet 1 er
ACK 1
Packet 2
ACK 2
Packet 3
ACK 2
Packet 4
Packet 5
ACK 2
Packet 6
ACK 2
Retrans
mission
packet 3 ACK3
Performance measure
Performance measure
Classic FS-TCP-
HOST SF
%F %RT %F %RT
R O R O
sigcomm.cmcl.cs.cm 24. 75.8 53. 46.8
u.edu 2 2
88.9 27.5
manchester-
11. 72.
1.cmcl.cs.edu 1 5
81.0 27.7
ssh.workspot.net
19. 72.
0 3
Fragmentation
TCP-SMART FRAMING
Fast Recovery
FEASIBILITY REPORT
TCP-SMART FRAMING
In this system we are going to develop a facility to a user that he will not
face any difficulty at the time of usage like data missing, one way
technique of speed controlling the frame relay will not be a problem for
Feasibility Study
analysis and Design Process. The study begins by classifying the problem
TCP-SMART FRAMING
problem definition has been generated, the analyst develops a logical model
Operational Feasibility:
• If there was sufficient support for the project from the management and
Project.
Technical feasibility
• Does the proposed equipment have the technical capacity for using the new
system?
platform
• The observer pattern along with factory pattern will update the results
eventually
• The language used in the development is JAVA 1.5 & Windows Environment
The system developed and installed will be good benefit to the organization.
The system will be developed and operated in the existing hardware and
Functional Requirements:
METHODOLOGIES
Authentication Module:
Start
Is
valid?
NO
YES
Authentication Module
Client Module:
TCP-SMART FRAMING
Client
Client Module
Server Module:
Server Module
Segmentation:
Segmentation
zero ,it’s for retransmitted the particular data to the client until
the transmission completed.
DESIGN TECHNIQUES
Send
Client reque If
Server
st Bursty
data
send
Send Proces Data
ACK s lost
Congesti
on
REQ Detectio
Send n
data
Seg
Alg
Reque
st
CONG
DATA DETECT
SEG
ACTIVATED
Burs
FRR
t
ACTIVATED
CLIENT
Congestion
Detection
Segmentatio
n Algorithm
1 2 3 4 5 FRR ALG
SERVER
1. Client request.
2. Server ACK.
4. Busty Data
5. No ACK
TCP-SMART FRAMING
CONGESTION DETECTION
Request
SERVER
ACK
CLIENT
Response
Congestion
Detection
Bursty Data
Data lost
SEGMENTATION
In this technique, the server gets the query form the client
and them gets the file packet formation process. The requested
file sends the client means where the data of the file are lost due
to the size of the file. While transmitting bulk of data means loss
occurs normally. So, we segment the data to avoid the data
losses with respect to segmentation technique. This segmentation
process is used to split the congestion packet into the two packets
for avoidance of the avoidance of the losses.
SERVER
Send ACK
Congestio
Segmentation
n CLIENT
Algorithm
Detection
Send Fast
Segmented Retransmit/ CLIENT
Data Recovery
SDLC METHDOLOGIES
TCP-SMART FRAMING
SDLC METHDOLOGIES
This document play a vital role in the development of life cycle (SDLC) as
developers and will be the basic during testing phase. Any changes made
approval process.
SPIRAL MODEL was defined by Barry Boehm in his 1988 article, “A spiral
the first model to discuss iterative development, but it was the first model
long. Each phase starts with a design goal and ends with a client
reviewing the progress thus far. Analysis and engineering efforts are
TCP-SMART FRAMING
applied at each phase of the project, with an eye toward the end goal of
the project.
product.
• At the customer option, the entire project can be aborted if the risk
final product.
above.
• The preceding steps are iterated until the customer is satisfied that
ADVANTAGES:
• Software engineers can get their hands in and start woring on the
SOFTWARE REQUIREMENT
Software Requirements:
Software Requirements :
TCP-SMART FRAMING
HARDWARE REQUIREMENT
Hardware Requirements:
• System Configuration
SYSTEM DESIGN
TCP-SMART FRAMING
PROCESS FLOW
A graphical tool used to describe and analyze the moment of data through a
delays in the system. Data Flow Diagrams are the central tool and the basis
DFDs are the model of the proposed system. They clearly should show the
requirements on which the new system should be built. Later during design
activity this is taken as the basis for drawing the system’s structure charts.
destination.
System.
TCP-SMART FRAMING
Send
Client reque If
Server
st Bursty
data
send
Send Proces Data
ACK s lost
Congesti
on
REQ Detectio
Send n
data
Seg
Alg
Reque
st
CONG
DATA DETECT
SEG
ACTIVATED
Burs
FRR
t
ACTIVATED
CLIENT
Congestion
Detection
Segmentatio
n Algorithm
1 2 3 4 5 FRR ALG
SERVER
1. Client request.
2. Server ACK.
4. Busty Data
5. No ACK
CONGESTION DETECTION
TCP-SMART FRAMING
Request
SERVER
ACK
CLIENT
Response
Congestion
Detection
Bursty Data
Data lost
SEGMENTATION
TCP-SMART FRAMING
In this technique, the server gets the query form the client
and them gets the file packet formation process. The requested
file sends the client means where the data of the file are lost due
to the size of the file. While transmitting bulk of data means loss
occurs normally. So, we segment the data to avoid the data
losses with respect to segmentation technique. This segmentation
process is used to split the congestion packet into the two packets
for avoidance of the avoidance of the losses.
SERVER
Send ACK
Congestio
Segmentation
n CLIENT
Algorithm
Detection
UML Diagrams
TCP-SMART FRAMING
A UML system is represented using five different views that describe the
perspective.
UML Analysis modeling, this focuses on the user model and structural
Use case Diagrams represent the functionality of the system from a user’s
point of view. Use cases are used during requirements elicitation and
analysis to represent the functionality of the system. Use cases focus on the
Actors are external entities that interact with the system. Examples of actors
include users like administrator, bank customer …etc., or another system like
central database.
TCP-SMART FRAMING
Class Diagram:
TCP-SMART FRAMING
Registeration
Login
ViewPrivateFiles
ViewPublicFiles
Client
SendFiles
Exit
USECASE-2
getPackets
viewPackets
Server
VerifyPackets
recollectsPackets
TCP-SMART FRAMING
Activity Diagram:
Client:
Client
Login
fail
enter username,password
success
Server:
Server
Sequence Diagram:
Client:
login()
Check()
Fails()
viewPrivateFiles()
ViewPublicfiles()
SendFiles()
exit()
TCP-SMART FRAMING
Server:
GetPackets()
ViewPackets()
VerifyPackets()
RecollectPAcets()
TCP-SMART FRAMING
Collaboration Diagram:
Client:
2: Check()
1: login() 4: viewPrivateFiles()
Client Authentic Private
ation Files()
3: Fails()
5: ViewPublicfiles() 6: SendFiles()
7: exit()
Public
Files()
Send Exit
TCP-SMART FRAMING
Server:
1: GetPackets()
2: ViewPackets()
3: VerifyPackets()
Server Packets
4: RecollectPAcets()
Recollect
TCP-SMART FRAMING
Deployment Diagram:
Component Diagram:
TCP-SMART FRAMING
TCP-SMART FRAMING
TECHNOLOGY DESCRIPTION
About Java:
TCP-SMART FRAMING
Initially the language was called as “oak” but it was renamed as “Java” in
1995. The primary motivation of this language was the need for a platform-
programming.
Swings:
Swing, which is an extension library to the AWT, includes new and improved
components that enhance the look and functionality of GUIs. Swing can be used to
build Standalone swing Gui Apps as well as Servlets and Applets. It employs a
model/view design architecture. Swing is more portable and more flexible than
AWT.
Swing is built on top of AWT and is entirely written in Java, using AWT’s lightweight
component support. In particular, unlike AWT, t he architecture of Swing
components makes it easy to customize both their appearance and behavior.
Components from AWT and Swing can be mixed, allowing you to add Swing support
to existing AWT-based programs. For example, swing components such as JSlider,
JButton and JCheckbox could be used in the same program with standard AWT
labels, textfields and scrollbars. You could subclass the existing Swing UI, model, or
TCP-SMART FRAMING
change listener classes without having to reinvent the entire implementation. Swing
also has the ability to replace these objects on-the-fly.
• Three parts
Component set (subclasses of JComponent)
Support classes
Interfaces
The class JComponent, descended directly from Container, is the root class for most
of Swing’s user interface components.
TCP-SMART FRAMING
Swing contains components that you’ll use to build a GUI. I am listing you some of
the commonly used Swing components. To learn and understand these swing
programs, AWT Programming knowledge is not required.
system of that computer. It is more or less like one creating using C or C++.
dynamically downloaded across the network, just like an image. But the
difference is, it is an intelligent program, not just a media file. It can react to
FEATURES OF JAVA:
Security
Every time you that you download a “normal” program, you are risking a
viral infection. Prior to Java, most users did not download executable
programs frequently, and those who did scanned them for viruses prior to
execution. Most users still worried about the possibility of infecting their
exists that must be guarded against. This type of program can gather
Portability
needed .As you will see, the same mechanism that helps ensure security also helps
create portability. Indeed, Java’s solution to these two problems is both elegant and
efficient.
TCP-SMART FRAMING
The key that allows the Java to solve the security and portability problem is that the
output of Java compiler is Byte code. Byte code is a highly optimized set of
instructions designed to execute by the Java run-time system, which is called the
Java Virtual Machine (JVM). That is, in its standard form, the JVM is an interpreter
Translating a Java program into byte code helps makes it much easier to run a
program in a wide variety of environments. The reason is, Once the run-time
package exists for a given system, any Java program can run on it.
about Java that prevents on-the-fly compilation of byte code into native
code. Sun has just completed its Just In Time (JIT) compiler for byte code.
When the JIT compiler is a part of JVM, it compiles byte code into executable
compile an entire Java program into executable code all at once, because
Java performs various run-time checks that can be done only at run time.
Beyond the language, there is the Java virtual machine. The Java virtual
loading process, a class loader is invoked and does byte code verification
makes sure that the code that’s has been generated by the compiler will not
corrupt the machine that it’s loaded on. Byte code verification takes place at
the end of the compilation process to make sure that is all accurate and
of Java code.
programming uses to produce byte codes and executes them. The first box
indicates that the Java source code is located in a. Java file that is processed
with a Java compiler called JAVA. The Java compiler produces a file called a.
class file, which contains the byte code. The class file is then loaded across
environment is the Java virtual machine, which interprets and executes the
byte code.
TCP-SMART FRAMING
Java Architecture
for development. Java provides portability by compiling the byte codes for
the Java Virtual Machine, which is then interpreted on each platform by the
Compilation of Code
When you compile the code, the Java compiler creates machine code (called
byte code) for a hypothetical machine called Java Virtual Machine (JVM). The
JVM is supposed to execute the byte code. The JVM is created for
overcoming the issue of portability. The code is written and compiled for one
machine and interpreted on all machines. This machine is called Java Virtual
Machine.
During run-time the Java interpreter tricks the byte code file into thinking
running system and all could receive code from any computer through
SIMPLE
Java was designed to be easy for the Professional programmer to learn and to use
effectively. If you are an experienced C++ programmer, learning Java will be even
TCP-SMART FRAMING
easier. Because Java inherits the C/C++ syntax and many of the object oriented
features of C++. Most of the confusing concepts from C++ are either left out of
Object-Oriented
Java was not designed to be source-code compatible with any other language. This
allowed the Java team the freedom to design with a blank slate. One outcome of
this was a clean usable, pragmatic approach to objects. The object model in Java is
simple and easy to extend, while simple types, such as integers, are kept as high-
performance non-objects.
Robust
program, because the program must execute reliably in a variety of systems. The
ability to create robust programs was given a high priority in the design of Java.
Java is strictly typed language; it checks your code at compile time and run time.
which is completely automatic. In a well-written Java program, all run time errors
What is networking?
Computers running on the Internet communicate to each other using either the
Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP), as this
diagram illustrates:
TCP-SMART FRAMING
When you write Java programs that communicate over the network, you are
programming at the application layer. Typically, you don't need to concern yourself
with the TCP and UDP layers. Instead, you can use the classes in the java.net
However, to decide which Java classes your programs should use, you do need to
TCP
establish a connection and send data back and forth over that connection.
number and she answers. You send data back and forth over the connection
by speaking to one another over the phone lines. Like the phone company,
TCP guarantees that data sent from one end of the connection actually gets
to the other end and in the same order it was sent. Otherwise, an error is
reported.
TCP-SMART FRAMING
Protocol (FTP), and Telnet are all examples of applications that require a
reliable communication channel. The order in which the data is sent and
When HTTP is used to read from a URL, the data must be received in the
order in which it was sent. Otherwise, you end up with a jumbled HTML file,
UDP
The UDP protocol provides for communication that is not guaranteed between two
applications on the network. UDP is not connection-based like TCP. Rather, it sends
Sending datagrams is much like sending a letter through the postal service: The
order of delivery is not important and is not guaranteed, and each message is
the transfer of information from one end of the connection to the other.
In fact, they may be slowed down by the extra overhead or the reliable
Consider, for example, a clock server that sends the current time to its client
when requested to do so. If the client misses a packet, it doesn't really make
sense to resend it because the time will be incorrect when the client receives
it on the second try. If the client makes two requests and receives packets
from the server out of order, it doesn't really matter because the client can
figure out that the packets are out of order and make another request. The
channel is the ping command. The purpose of the ping command is to test
the communication between two programs over the network. In fact, ping
good or bad the connection is. A reliable channel would invalidate this
service altogether.
another. Sending datagrams is much like sending a letter through the mail
service: The order of delivery is not important and is not guaranteed, and
Note: Many firewalls and routers have been configured not to allow UDP packets.
are having trouble connecting to your service, ask your system administrator if UDP
is permitted.
Understanding Ports
Generally speaking, a computer has a single physical connection to the network. All
data destined for a particular computer arrives through that connection. However,
the data may be intended for different applications running on the computer. So
how does the computer know to which application to forward the data? Through the
use of ports.
information that identifies the computer and the port for which it is destined.
data to the right computer on the network. Ports are identified by a 16-bit
number, which TCP and UDP use to deliver the data to the right application.
a socket to a specific port number. This has the effect of registering the
TCP-SMART FRAMING
server with the system to receive all data destined for that port. A client can
then rendezvous with the server at the server's port, as illustrated here:
Definition: The TCP and UDP protocols use ports to map incoming data to a
contains the port number of its destination and UDP routes the packet to the
Port numbers range from 0 to 65,535 because ports are represented by 16-bit
numbers. The port numbers ranging from 0 - 1023 are restricted; they are reserved
for use by well-known services such as HTTP and FTP and other system services.
These ports are called well-known ports. Your applications should not attempt to
bind to them.
TCP-SMART FRAMING
Through the classes in java.net, Java programs can use TCP or UDP to
communicate over the Internet. The URL, URL Connection, Socket, and Server
Socket classes all use TCP to communicate over the network. The Datagram
Packet, Datagram Socket, and Multicast Socket classes are for use with UDP.
What Is a URL?
If you've been surfing the Web, you have undoubtedly heard the term URL
and have used URLs to access HTML pages from the Web.
It's often easiest, although not entirely accurate, to think of a URL as the
name of a file on the World Wide Web because most URLs refer to a file on
some machine on the network. However, remember that URLs also can point
output.
Definition: URL is an acronym for Uniform Resource Locator and is a reference (an
The following is an example of a URL which addresses the Java Web site
• Protocol identifier
• Resource name
Note that the protocol identifier and the resource name are separated by a
colon and two forward slashes. The protocol identifier indicates the name of
the protocol to be used to fetch the resource. The example uses the
access different types of resources on the net. Other protocols include File
The resource name is the complete address to the resource. The format of
the resource name depends entirely on the protocol used, but for many
protocols, including HTTP, the resource name contains one or more of the
For many protocols, the host name and the filename are required, while the
port number and reference are optional. For example, the resource name for
an HTTP URL must specify a server on the network (Host Name) and the
path to the document on that machine (Filename); it also can specify a port
number and a reference. In the URL for the Java Web site java.sun.com is the
host name and the trailing slash is shorthand for the file named /index.html.
System Calls
system call returns a small integer value similar to a file descriptor Name.
When a socket is created it does not have nay notion of endpoint address. An
application calls bind to specify the local; endpoint address in a socket. For TCP/IP
TCP-SMART FRAMING
protocols, the endpoint address uses the socket address in structure. Servers use
bind to specify the well-known port at which they will await connections.
remote server. An argument to connect allows the client to specify the remote
endpoint, which include the remote machines IP address and protocols port
number. Once a connection has been made, a client can transfer data across it.
Accept creates a new socket for each new connection request and returns the
descriptor of the new socket to its caller. The server uses the new socket only for
the new connections it uses the original socket to accept additional connection
requests once it has accepted connection, the server can transfer data on the new
socket.
Return Value:
description
Listen - place the socket in passive mode and set the number of incoming TCP
connections the system will en-queue. Backlog - specifies how many connections
TCP-SMART FRAMING
requests can be queued by the system while it wants for the server to execute the
accept system call it us usually executed after both the socket and bind system
These system calls are similar to the standard read and write system calls, but
CODING
TCP-SMART FRAMING
Server:
import java.io.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
import java.net.*;
{
TCP-SMART FRAMING
super("Server Window");
Container c=getContentPane();
c.setBackground(new Color(84,69,103));
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.Wind
owsLookAndFeel");
lab1=new JLabel("servername");
lab1.setForeground(Color.BLACK);
lab2=new JLabel("serverpass");
lab2.setForeground(Color.BLACK);
tf1=new JTextField();
tf2=new JPasswordField();
jb1=new JButton("Start");
jb1.setBackground(new Color(32,43,32));
jb1.setForeground(Color.white);
jb2=new JButton("Stop");
jb2.setBackground(new Color(32,43,32));
jb2.setForeground(Color.white);
pan=new JPanel();
TCP-SMART FRAMING
pan.setLayout(new GridLayout(2,2));
pan.add(lab1);
pan.add(tf1);
pan.add(lab2);
pan.add(tf2);
pan1=new JPanel();
pan1.setLayout(new GridLayout(1,2));
pan1.setBackground(new Color(84,69,103));
pan1.add(jb1);
pan1.add(jb2);
jb1.addActionListener(new ActionListener()
a)
if(tf1.getText().equalsIgnoreCase("server") &&
tf2.getText().equalsIgnoreCase("server"))
{
TCP-SMART FRAMING
JOptionPane.showMessageDialog(null,"server
started successfully");
dispose();
new serverListen();
new form();
}else
tf1.setText("");tf2.setText("");
JOptionPane.showMessageDialog(null,"Invalid
values");
});
jb2.addActionListener(new ActionListener()
a)
TCP-SMART FRAMING
System.exit(0);
});
c.setLayout(new BorderLayout());
c.add(pan,BorderLayout.CENTER);
c.add(pan1,BorderLayout.SOUTH);
setLocation(250,200);
setResizable(false);
setDefaultCloseOperation(3);
setSize(200,100);
show();
try{
TCP-SMART FRAMING
new server();
}catch(Exception e)
System.out.println("Err in server->"+e);
User:
import java.io.*;
import java.awt.event.*;
TCP-SMART FRAMING
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
import java.net.*;
private Socket
new_socket=null,send_socket=null;
public user()
Container c=getContentPane();
try
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.Wind
owsLookAndFeel");
}catch(Exception mm)
System.out.println(mm.toString());
c.setLayout(null);
c.setBackground(new Color(153,204,255));
PROCESS WINDOW";
j2=new JLabel(str);
j2.setFont(new
Font("DIALOG",Font.BOLD,15));
TCP-SMART FRAMING
j2.setBounds(135,30,600,20);
ju=new JLabel("IPADDRESS");
ju.setBounds(150,110,100,20);
jt1=new JTextField("machine8",20);
jt1.setBounds(300,110,150,20);
j3=new JLabel("USERNAME");
j3.setBounds(150,160,100,20);
jt2=new JTextField(20);
jt2.setBounds(300,160,150,20);
j4=new JLabel("PASSWORD");
j4.setBounds(150,210,100,20);
jt3=new JPasswordField(20);
jt3.setBounds(300,210,150,20);
jb1.setBounds(170,300,100,20);
jb1.setMnemonic('n');
TCP-SMART FRAMING
jb1.addActionListener(new reg());
jb2=new JButton("CONNECT");
jb2.setBounds(325,300,100,20);
jb2.setMnemonic('c');
jb2.addActionListener(new con());
c.add(j2);
c.add(ju);c.add(jt1);
c.add(j3);c.add(jt2);
c.add(j4);c.add(jt3);
c.add(jb1);c.add(jb2);
setLocation(50,75);
setDefaultCloseOperation(3);
setResizable(false);
setSize(600,400);
show();
try
new_packet.set_ip(jt1.getText().trim());
new_packet.set_user(jt2.getText().trim());
new_packet.set_pass(jt3.getText().trim());
new_socket=new
Socket(jt1.getText().trim(),3000);
new_out=new
ObjectOutputStream(new_socket.getOutputStream());
new_packet.set_act("new");
new_out.writeObject(new_packet);
new_in=new
ObjectInputStream(new_socket.getInputStream());
packet
get_resp=(packet)new_in.readObject();
TCP-SMART FRAMING
if(get_resp.get_act().equals("reg"))
JOptionPane.showMessageDialog(new
Server",JOptionPane.PLAIN_MESSAGE);
jt1.setText("");
jt2.setText("");
jt3.setText("");
}else
JOptionPane.showMessageDialog(new
jt1.setText("");
jt2.setText("");
jt3.setText("");
}catch(Exception e)
TCP-SMART FRAMING
JOptionPane.showMessageDialog(new
JFrame(),"Error-->"+e,"Exception Message",0);
try
send_packet.set_ip(jt1.getText().trim());
serip=jt1.getText().trim();
send_packet.set_user(jt2.getText().trim());
username=jt2.getText().trim();
TCP-SMART FRAMING
send_packet.set_pass(jt3.getText().trim());
send_packet.set_locip(InetAddress.getLocalHost().getHostName().t
oString());
send_socket=new
Socket(jt1.getText().trim(),3000);
portnum=3000;
send_out=new
ObjectOutputStream(send_socket.getOutputStream());
send_packet.set_act("log");
send_out.writeObject(send_packet);
send_in=new
ObjectInputStream(send_socket.getInputStream());
packet get_res=(packet)send_in.readObject();
if(get_res.get_act().equals("permit"))
JOptionPane.showMessageDialog(new
Server",JOptionPane.PLAIN_MESSAGE);
jt3.setText("");
jt1.setText("");
TCP-SMART FRAMING
jt2.setText("");
hide();
dispose();
new
packet_send(serip,username,portnum);
new listen(get_res.get_cip());
}else
JOptionPane.showMessageDialog(new
jt3.setText("");
jt1.setText("");
jt2.setText("");
}catch(Exception e)
{
TCP-SMART FRAMING
JOptionPane.showMessageDialog(new
JFrame(),"Error-->"+e,"Exception Message",0);
new user();
Packet Send:
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import java.net.*;
TCP-SMART FRAMING
import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.event.*;
import java.lang.*;
import java.util.*;
public String
server_ip,user_name,dval,ofval,listname="",filen="";
TCP-SMART FRAMING
username,int port)
====>"+username);
try
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.Wind
owsLookAndFeel");
}catch(Exception mm)
System.out.println(mm.toString());
Container c=getContentPane();
c.setBackground(new Color(153,204,255));
this.server_port=port;
TCP-SMART FRAMING
this.server_ip=serip;
this.user_name=username;
c.setLayout(null);
pan.setFont(new Font("Bold",Font.BOLD,18));
pan.setBounds(10,0,800,100);
l4=new JLabel("PERMITFILES");
l4.setBounds(50,150,100,20);
l3=new JLabel("PUBLICFILES");
l3.setBounds(200,150,100,20);
l5.setBounds(350,150,150,20);
ta=new JTextArea();
tajsp=new JScrollPane(ta);
tajsp.setBounds(350,190,300,200);
flist=new JList();
fjsp=new JScrollPane(flist);
fjsp.setBounds(50,190,125,200);
TCP-SMART FRAMING
dlist=new JList();
djsp=new JScrollPane(dlist);
djsp.setBounds(200,190,125,200);
b1=new JButton("view");
b1.setBounds(100,450,100,25);
b1.setBackground(new Color(153,204,255));
b1.addActionListener(new ActionListener()
ae)
getfile();
});
b2=new JButton("Get");
b2.setBounds(300,450,100,25);
b2.setBackground(new Color(153,204,255));
b2.addActionListener(new store());
TCP-SMART FRAMING
b3=new JButton("exit");
b3.setBounds(500,450,100,25);
b3.setBackground(new Color(153,204,255));
b3.addActionListener(new ActionListener()
ae)
try{
send_packet.set_user(user_name);
send_packet.set_locip(InetAddress.getLocalHost().getHostName().t
oString());
Socket send_socket=new
Socket(server_ip,3000);
ObjectOutputStream send_out=new
ObjectOutputStream(send_socket.getOutputStream());
send_packet.set_act("exit");
send_out.writeObject(send_packet);
TCP-SMART FRAMING
ObjectInputStream send_it=new
ObjectInputStream(send_socket.getInputStream());
packet
pl=(packet)send_it.readObject();
if(pl.get_act().equals("ok"))
JOptionPane.showMessageDialog(new
Server",JOptionPane.PLAIN_MESSAGE);
System.exit(0);
}else
JOptionPane.showMessageDialog(new
}catch(Exception gh)
{System.out.println("err in log->"+gh);
}
TCP-SMART FRAMING
});
flist.addListSelectionListener(new
ListSelectionListener()
le)
listname="";
filen="";
// dlist.setEnabled(false);
listname="permit";
filen=String.valueOf(flist.getSelectedValue());
});
dlist.addListSelectionListener(new
ListSelectionListener()
{
TCP-SMART FRAMING
le)
listname="";
filen="";
// flist.setEnabled(false);
listname="public";
filen=String.valueOf(dlist.getSelectedValue());
});
c.add(pan);
c.add(l3);
c.add(fjsp);
c.add(l4);
c.add(djsp);
c.add(l5);
c.add(tajsp);
TCP-SMART FRAMING
c.add(b1);c.add(b2);c.add(b3);
setSize(700,600);
setLocation(50,50);
setDefaultCloseOperation(3);
show();
try
send_packet.set_user(user_name);
send_packet.set_locip(InetAddress.getLocalHost().getHostName().t
oString());
Socket send_socket=new
Socket(server_ip,3000);
TCP-SMART FRAMING
ObjectOutputStream send_out=new
ObjectOutputStream(send_socket.getOutputStream());
send_packet.set_act("get");
send_out.writeObject(send_packet);
ObjectInputStream send_it=new
ObjectInputStream(send_socket.getInputStream());
packet pl=(packet)send_it.readObject();
if(pl.get_act().equals("list"))
dv=new Vector();
fv=new Vector();
String dir[]=pl.getdirectories();
String file[]=pl.getfiles();
int dlen=dir.length;
int flen=file.length;
for(int i=0;i<dlen;i++)
dv.addElement(dir[i]);
}
TCP-SMART FRAMING
for(int x=0;x<flen;x++)
fv.addElement(file[x]);
dlist.removeAll();
dlist.setListData(dv);
flist.removeAll();
flist.setListData(fv);
}else
JOptionPane.showMessageDialog(null,"Server
Message",JOptionPane.ERROR_MESSAGE);
flist.removeAll();
flist.setListData(fvv);
dlist.removeAll();
dlist.setListData(dvv);
TCP-SMART FRAMING
}catch(Exception p)
JOptionPane.showMessageDialog(null,"error in
ps-->"+p);
try
String listnames=listname;
String fn=filen;
send_packet.set_user(user_name);
TCP-SMART FRAMING
send_packet.set_locip(InetAddress.getLocalHost().getHostName().t
oString());
Socket send_socket=new
Socket(server_ip,3000);
ObjectOutputStream send_out=new
ObjectOutputStream(send_socket.getOutputStream());
send_packet.set_act("abs");
send_packet.set_orgfilename(filen);
send_packet.set_filename(listnames);
send_out.writeObject(send_packet);
}catch(Exception mg)
System.out.println("Error in get
class-->"+mg);
{
TCP-SMART FRAMING
new packet_send("dfff","sdfsf",3000);
TESTING
TCP-SMART FRAMING
Testing Concepts
• Testing
• Testing Methodologies
• Levels of Testing
Unit Testing.
Module Testing.
Integration Testing.
System Testing.
• Types Of Testing
Smoke Testing.
TCP-SMART FRAMING
Sanitary Testing.
Regression Testing.
Re-Testing.
Static Testing.
Dynamic Testing.
Alpha-Testing.
Beta-Testing.
Monkey Testing.
Compatibility Testing.
Installation Testing.
Adhoc Testing.
Ext….
• STLC
Test Planning.
Test Development.
Test Execution.
Result Analysis.
Bug-Tracing.
Reporting.
• Manual Testing
TCP-SMART FRAMING
Win Runner.
Test Director.
Testing:
satisfaction.
• Testing can demonstrate the presence of bugs, but not their absence
Testing Methodologies:
knowledge.
Levels of Testing:
TCP-SMART FRAMING
Test Planning:
TCP-SMART FRAMING
3. Objective of testing,
Used….
Test Development:
Of application.
application
Types Of Testing:
> Smoke Testing: is the process of initial testing in which tester looks for
initially to check for the proper behavior of an application that is to check all
them.
TCP-SMART FRAMING
tested before, is once again tested whenever some new change is added in
functionality which is already tested before to make sure that the defects are
reproducible and to rule out the environments issues if at all any defects are
there.
Adhoc Testing: Adhoc Testing is the process of testing in which unlike the
formal testing where in test case document is used, with out that test case
TCP-SMART FRAMING
future which are not covered in that test case document. Also it is intended
• Test Scenario
• Test Procedure
• Test case
This is the sample test case document for the Case Investigate details of
Client project:
Test scope:
Test Scenario:
TCP-SMART FRAMING
• When the office personals use this screen for the data entry, adding
Test Procedure:
• The procedure for testing this screen is planned in such a way that the
Negative testing using the corresponding GUI test cases, Positive test
Test Cases:
• Look for Default values if at all any (date & Time, if at all any require)
value
contain
all the
features
way
are justified.
are justified.
value
Password
TCP-SMART FRAMING
value
username and
password
2
TCP-SMART FRAMING
SCREENS
TCP-SMART FRAMING
Start Server:
TCP-SMART FRAMING
Connect to server:
TCP-SMART FRAMING
Start Client:
TCP-SMART FRAMING
Connect To Server:
TCP-SMART FRAMING
FUTURE ENHANCEMENTS:
the user. User requirements keep changing as the system is being used.
Some of the future enhancements that can be done to this system are:
be easily adaptable.
emerging technologies.
TCP-SMART FRAMING
BIBLIOGRAPHY
TCP-SMART FRAMING
REFERENCES
http://www.answers.com
(8) http://it.toolbLox.com/wiki/index.php/Warehouse_Management
TCP-SMART FRAMING