Nt1330 Unit 5 Research Paper

Improved Essays
THE DEFERENCES OF HANDLING SOCKET AND SERVERSOCKET First of all what is a socket?
A socket is the one end –point of two-way communication link between two programs running over the network. This means the programs run on different computers, usually referred as the local and the remote computer. However, one can run the two programs on the same computer. Such communicating programs constitute a client/server application normally; a server runs on a specific computer and has a socket that is bound to a specific port number. The server just waits, listening to the socket for a client to make a connection request (Polam, 2014).
On the client- side, the client knows the hostname of the machine on which the server is ruing and the port number on which the server is listening. To make a connection request, the client tries to rendezvous with the server on the on the server’s machines and port. The client also needs to identify itself to the server so that it binds to a local port number that it will use during this connection. *The communication with each client is done via the sockets created for each communication. SERVER CLIENT ,--------------. ,--------------. | ,-| | | | accept | || | read/write | | `-| |-' | `--------------' `--------------' *“A socket” is an abstraction of IP Port.
…show more content…
First appeared in early 1970’systems, There are two kinds of sockets:
1, the connection oriented socket based on TCP
2, connectionless sockets based on user Datagram Protocol (UDP).
*The TCP type sockets guarantee data arrives in the correct order, but the user Datagram protocol (UDP) does not.
One of the main differences between (” socket” and “server socket “) is;
* Socket implemented at the client side to send request to the port of the machine where the server socket is listing. But
*server socket implemented at the server side so that it can listen to the client’s and respond to them,
When we look at this two differently, the socket class placed on the client’s side, which is send request to the server side socket and waits for the response from the server. While the server socket placed in server side, which is sends requests to clients’ side socket and waits for response from client.
In censes, we need to make an object of socket class for networking application. While for server side, networking application server socket class is used. A method named server socket_ object. Accepts [] is used by server to listen to clients at a specific port addresses. So in general summary the socket completely based on the client’s side while the server socket based on the server side. *Opening a socket * When programming a client, a socket must be opened like this: When programming a client, a socket must be opened like below: Socket MyClient; MyClient = new Socket("MachineName", PortNumber); This code, however, must be put in a try/catch block to catch the IOException: Socket MyClient; try { MyClient = new Socket("MachineName", PortNumber); } catch (IOException e) { System.out.println(e); } Where • MachineName is the machine name to open a connection to and • PortNumber is the port number on which the server to connect to is listening. When selecting a port number, one has to keep in mind that the port numbers in the range from 0 to 1023 are reserved for standard services, such as email, FTP, HTTP, etc. For our service (the chat server) the port number should be chosen greater than 1023. The server side When programming a server, a server socket must be created first, like below: ServerSocket MyService; try { MyServerice = new ServerSocket(PortNumber); } catch (IOException e) { System.out.println(e); } The server socket is dedicated to listen to and accept connections from clients. After accepting a request from a client the server creates a client socket to communicate (to send/receive data) with the client, like below : Socket clientSocket = null; try { serviceSocket = MyService.accept(); } catch (IOException e) { System.out.println(e); } Now the server can send/receive data to/from the clients. Since the sockets are like the file descriptors the send/receive operations are implemented like read/write file operations on the input/output streams. Creating an input stream On the client side, you can use the DataInputStream class to create an input stream to

Related Documents

  • Great Essays

    Nt2580 Unit 6 Lab 1

    • 1713 Words
    • 7 Pages

    OMIS 660 Business Computing Environment and Network Lab - 1 REPORT TCP: Transmission Control Protocol SUMMARY: The idea of TCP congestion control is for each sender to determine the available capacity in the network so that it knows how many packets can be safely transmitted. The congestion window is a state variable for each connection which is used by the sender to limit how much data a sender can transmit into the network before receiving an acknowledgement. This report consist of the simulation of different model of TCP transmission which demonstrates the congestion control using the variation of dynamic window size implemented by TCP (Transmission Control Protocol). Various models are considered where packet drop rates are varied for demonstration of different situations from…

    • 1713 Words
    • 7 Pages
    Great Essays
  • Improved Essays

    BankID [11] allows users to log in into different merchants by using the same password and two-factor authentication. With this, it helps people to save their bank account. This is used in a web site (merchant) when it needs to securely identify its users. Overall the user need to enter their SSN (Social security number), a password, and at the end a one-time password.…

    • 640 Words
    • 3 Pages
    Improved Essays
  • Decent Essays

    It is software free, so it can run on all operating systems…

    • 351 Words
    • 2 Pages
    Decent Essays
  • Decent Essays

    Nt1310 Unit 3 Exercise 1

    • 271 Words
    • 2 Pages

    The game itself starts in a main menu, which has the ability, navigating with keyboard controls or a joypad. When play is pressed, the lobby screen opens. This is where players connect to the game. 3.2 Linking the Network Pre-defining the IP address of the server in the code allows users to connect when they enter the lobby.…

    • 271 Words
    • 2 Pages
    Decent Essays
  • Improved Essays

    North Bound Interface Northbound APIs must support a wide variety of applications because SDN is bound to the innovative applications it can potentially support and enable. The northbound API is not standardized and often allows fine-grained control of switches. Applications should and do not need to process details of the southbound interface, such as details about the network topology [14]. OpenFlow protocol provides an interface that allows a control software to program switches in the network.…

    • 640 Words
    • 3 Pages
    Improved Essays
  • Decent Essays

    1. Name two creatures that have been discovered since you were born. Titi Monkey and Dumbo Octopus have been discovered since I was born. 2. How tall would a redwood be compared to you right now?…

    • 317 Words
    • 2 Pages
    Decent Essays
  • Decent Essays

    Nt1330 Unit 5 Test Paper

    • 597 Words
    • 3 Pages

    Student Name: Caroline machinjili THIRD YEAR DEGREE IN COMPUTING AT CCT DUBLIN SUBJECT: ADVANCED SWITHCING AND ROUTING PORTFAST AND ETHERCHANNEL October 2015 PORTFAST in my network I have setup portfast on all the 18 access switches connected to the workstations and also on the core switches connected to the servers. on both switches I have used ports fa0/1 to fa0/2. portfast on these ports will reduce the time the devices spend to connect to other devices on the network since these ports will not go through the spanning tree process of blocking, listening , learning and then forwarding which cause a delay of about 45 -50 seconds instead the ports will go straight to forwarding stage there by speeding up communication between devices in a network. for example in a company that have servers which provide services to clients. I have observed this process in my network and I will strongly recommend for the use of portfast.…

    • 597 Words
    • 3 Pages
    Decent Essays
  • Improved Essays

    Microsoft Hyper-V Server 2012 R2 is a server designed for virtual machine (VM). Virtualization is creation include storage, device, operation system as virtual rather than physical. Almost similar to VMware vSphere as virtual machine. VMware vSphere is cost for VMware install on server. But the features will be available than Microsoft Hyper-V Server 2012 R2 because it is free virtual machine for stand-alone.…

    • 637 Words
    • 3 Pages
    Improved Essays
  • Improved Essays

    There are numerous reasons why there is a need for every home cook to own stainless steel bowls. The bowl made from stainless steel has a very durable built and it can even be your partner for a lifetime. These bowls can also keep all your cold items in its cool state as it insulates the items. If you have noticed in parties and social events, there are bowls made from stainless steel used for keeping items such as water, lemonade, soda and others, in order to keep it cool. Placing the bowl on the freezer for only very few minutes will allow it to keep those items placed on it for longer period.…

    • 513 Words
    • 3 Pages
    Improved Essays
  • Improved Essays

    In this task I will be using a diagram to outline the relationship between the layers in an interface showing each other of the points in the corresponding layer in the TCP/IP protocol suite. I will also be describing the type and functions of entities and the service they provide. A) The way communications are done between a computers on a network is through protocol suits. The most used protocol suite and commonly available protocol suite is TCP/IP protocol suite.…

    • 505 Words
    • 3 Pages
    Improved Essays
  • Improved Essays

    ASSIGNMENT QUESTIONS: 1. What is the regulation or law that you would propose? Be very specific in the wording. (This will be your own idea and written in your own words). (20 points) Answer:…

    • 672 Words
    • 3 Pages
    Improved Essays
  • Improved Essays

    A denial of service attack is a push to make one or more PC frameworks inaccessible. It is normally focused at web servers, however it can likewise be utilized on mail servers, name servers, and some other sort of PC framework. Denial of service attack (DoS) attacks may be started from a solitary machine, yet they normally utilize numerous PCs to do an attacks. Since most servers have firewalls and other security programming introduced, it is anything but difficult to bolt out individual frameworks. In this way, circulated denial of service attack (DDoS) attacks are frequently used to organize various frameworks in a concurrent attacks.…

    • 364 Words
    • 2 Pages
    Improved Essays
  • Improved Essays

    The Internet was originally called the ARPANET, and in order to enhance the ARPANET to be enable may different types of computer networks to all communicate with each other, an open source protocol needed to be created, hence the development of TCP/IP. TCP/IP improved communications throughout the network and allowed all computers to easily communicate with one another. Another technology that helped expand the ARPANET to more users in a specific location was the development of the Ethernet. Ethernet is a coaxial cable that is still used today in many local area networks. Ethernet is highly effective in moving data from one computer to another at high speeds.…

    • 790 Words
    • 4 Pages
    Improved Essays
  • Great Essays

    Intel Xeon Phi Case Study

    • 1200 Words
    • 5 Pages

    In excess to these cores, there are 16 memory channels. Generally for the programming of the Intel Xeon Phi coprocessor all the coprocessors are installed on the single host system. Intel Xeon processor known as the host is connected to Intel Xeon phi coprocessor through a bus named PCI Express. As the Intel Xeon Phi coprocessor runs Linux programming, the networking protocol would be the TCP/IP, which allows communication. TCP/IP stack is implemented over the PCIe bus thereby allowing the user to have access over the coprocessor as the networking node.…

    • 1200 Words
    • 5 Pages
    Great Essays
  • Improved Essays

    Most networks today use the TCP/IP protocol for how to communicate on the network and the most common is IP Version 4. Missing Elements In the diagram, it is showing that each department has three IP addresses assigned as well as three printers which are connected to the network via Ethernet. we can see that each department has three IP addresses assigned to it, and there are three printers, one for each department. These computers can communicate with one another as well as the printers, server, and Internet.…

    • 923 Words
    • 4 Pages
    Improved Essays