Download acknowledgement

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Distributed firewall wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Dynamic Host Configuration Protocol wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Airborne Networking wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Real-Time Messaging Protocol wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Remote Desktop Services wikipedia , lookup

Lag wikipedia , lookup

Transcript
ACKNOWLEDGEMENT
We would like to express our special thanks of gratitude to our teacher Mr. Daya
Sagar Baral who gave us the opportunity to do the project on Object Oriented
Programming in C++ which will help us in doing a lot of research work and
knowing the programming language in depth.
We are also thankful to our seniors (Final year students) for sharing with us their
ideas and experience on networking. A special thanks to Mr. Chandan Gupta for
his constant support. Also, we are grateful to our class mates for giving us
suggestions and feedbacks and helping us for the testing of the project.
ABSTRACT
The project “From Me To You” is an attempt to create a chat application with
the help of object oriented approach of programming using C++ and Windows
forms (Visual Studio 2013) for user interface. The application is very simple to
use. The client simply needs to enter the IP address of the server and the port
number. Then, on clicking the ‘Connect’ button, the connection between the client
and server is established. Then, the users can type the desired message in the
message box and click ‘Send’ button. The entire conversation of one session is
displayed to both the server and client.
1
TABLE OF CONTENTS
SN
1
2
3
4
5
6
7
8
9
10
11
12
CONTENT
OBJECTIVES
INTRODUCTION
APPLICATION
LITERATURE SURVEY
EXISTING SYSTEM
METHODOLOGY
IMPLEMENTATION
7.1 BLOCK DIAGRAM
RESULTS
PROBLEMS FACED AND SOLUTIONS
LIMITATIONS AND FUTURE
ENHANCEMENTS
CONCLUSION AND RECOMMENDATIONS
REFERENCES
2
PAGE NO
3
3
4
4
4
4
7
7
8
8
8
9
9
OBJECTIVES
The objectives of our project are :

To demonstrate the practical use of C++

To make a useful chat application

To facilitate communication within same network access point

To learn about computer networking

To be able to use the features of object oriented programming

To learn the use of Visual Studio to give the user a dedicated User Interface

To be able to work in a team

To make a base for the development a larger program.
INTRODUCTION
“From Me To You” is a chat application (or an instant messenger) based on client server
architecture. An instant messenger (shortly known as IM) is an online chatting application
which allows real time text transmission over the internet. In other words, it is a set of
communication technologies used for text based communication between two or more
participants over the internet. Instant messaging system provides the communication facility
between certain known users.
Our project has a server and a client window. It is a text-only type of web chatting application
in synchronous mode. The server asks for connection and the client attempts to connect. The
application works with keyboard as well as mouse inputs. The project focuses on the exchange
of information over a network. ’winsock2’ has been used to transmit data over the network.
We used Visual Studio 2013 IDE for this project, that facilitates the drag and drop facility for
the designing of the required elements.
3
APPLICATIONS
This project can find a wide application in in an office to send instant text messages amongst
the computers connected to the same network. It will make communication between the office
staff easier as they will not have to go to each other’s desks physically to deliver important
messages.
Also, it will highly facilitate students in the hostel to communicate to each other, since they are
connected to a same network point.
It can also be used in staff rooms and computer labs schools or colleges to send short notices.
LITERATURE SURVEY
The project revolves around the usage of object oriented approach of programming. Hence, our
main source of reference was “The Secrets Of Object Oriented Programming in C++” by DS
Baral. Similarly, other books of OOP were also consulted. To learn about computer
networking, different video tutorials and e-books were referred to.
EXISTING SYSTEM
Currently, a lot of applications are available which allow the users to transmit information in
real time. They are commonly known as ‘messenger’ or ‘instant messenger’. One of the most
popular chatting platform if the facebook chat. There are other applications like
YahooMessenger,
METHODOLOGY
“From Me To You” demonstrates how information can be exchanged in any network using
sockets. A network socket is an end-point for an inter-process communication flow across a
network. It is a protocol independent method for establishing connection among processes. A
socket API is an application programming interface provided by operating system that allows
programs to control and use network sockets. Windows provides a set of API functions for
4
creating sockets and sending or receiving information from them which is known as Winsock
API. A socket address is the combination of IP address and port number. Based on this address
internet sockets deliver incoming data packets to the appropriate application process. There are
two main components present in our project: server and client.
The following are the actions that a server performs:

Socket: create endpoint for communication (socket)

Bind: assigns the socket to an address

Listen: prepares socket for incoming connections

Accept: creates a new socket for each connection and removes the connection from the
listen queue

Send.recv: read/write operation

Shutdown: end reading or writing
The following are the actions that a client performs:

Socket: create endpoint for communication

Connect: connect to a server

Send.recv: read/write operation

Shutdown: end
The server calls the socket which creates an endpoint for the communications. The client also
does the same by calling socket. The server then calls bind() to attach an unique IP address and
a port number to which it is going to be listening for various clients. Then the server goes to
accept stage where it waits for a client to connect to it. At that time the client will use the
connect () call to establish a connection to the server. Once the client calls connect() and the
connection has been established with the server both of them can call read() or recv() and write
or send() to transfer data among each other. Once the data has been transferred they call the
close function to close the connection.
IP Addressing: IP address is a numerical label assigned to each device particularly in a
computer network. Each host on a TCP/IP network is assigned a unique 32-bit logical address
that is divided into two main parts: the network number and the host number. In our program
server cerates the sockets and bind the IP address. Then the connection with a client is
established.
Port Number: A port number is a way to identify a specific process to which an Internet or
other network message is to be forwarded when it arrives at a server. The purpose of ports is
5
to uniquely identify different applications or processes running on a single computer and
thereby enable them to share a single physical connection.
6
IMPLEMENTATION
Our project can have a wide field of implementation. It can be used in an office to send instant
text messages amongst the computers connected to the same network. It can be useful for
chatting within a private network. Also, it will highly facilitate students in the hostel to
communicate to each other, since they are connected to a same network point. The following
block diagram shows the implementation of our project.
BLOCK DIAGRAM:
Server Side
Client Side
Welcome Screen
Start
Ask for Connection
Start Hosting
Connection
reached
Server Connected
Client Connected
Chatting Area
Flow of message
Chatting Area
Quit
Quit
7
RESULTS
The objectives of doing the project, described in our proposal, have been achieved with its
completion. A complete application for the transfer of text from one computer to the other was
designed. Although the main objective of doing the project was accomplished, all features that
a chat machine can have, could not be created. As, we are in a learning phase, more time was
contributed to research regarding computer network and the usage of OOP in real world. After
the completion of the project, we learnt how to work in a team, divide work and manage time.
PROBLEMS FACED AND SOLUTIONS
This, being our first C++ project, a lot of problems were faced before its completion. As we
were all new to the concept of computer network, sockets and socket programming, the first
challenge was to understand the concepts thoroughly. This problem was solved by consulting
our seniors who have knowledge in this area. We also collected e-books, video tutorials and
other study materials from various sources.
The other problem we faced was the lack of knowledge in making the graphical user interface.
We first created a console framework of this project but while using visual studio, we faced
problems in establishing a connection. However, this problem was also solved by intensive
research.
Another major problem area was definitely the short time duration in which the project had to
be completed. As, its solution, we opted for work division among the team members.
LIMITATIONS AND FUTURE ENHANCEMENTS
“From Me To You” is a complete but a minor project. It is a small effort to build a chat
application. For now, it can be used only a small network area. It cannot be used in places
where a lot of computers are interconnected. The graphics can be made even more attractive.
It lacks client to client communication. It doesn’t provide users the facility of sending pictures,
emoticons or video. It can be used only for sending text. As of now, we were unable to
implement our program in public networks. For its enhancement a deeper knowledge of sockets
and socket programming is required.
8
CONCLUSION AND RECOMMENDATION
Doing the project was a great way to learn about the practical use of object oriented approach
of programming using C++ and Windows form application in Visual Studio. A lot of things,
which we could not learn simply by following our textbooks, were learnt on the course of
making this project. We also got the basic knowledge about computer networking which we
have not yet studied in our course. We are very glad to be given an opportunity to design a
project in the object oriented approach and present it to you all. We look forward to your
positive response and support regarding this project.
REFERENCE
1. www.google.com
2. www.youtube.com
3. MSDN forum
4. Winsock2 video tutorials
5. “The Secrets of object Oriented Programming in C++” by DS Baral and Diwakar Baral
9