Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Client
Once the GUI application is loaded, it will send a request (instance/object of Commands class) to server for a list of files from the server's shared directory.Client will write Commands object to ObjectOutputstream. Commands class has to implement Serializable interface as this will be transferred over the network. Commands class will have following value:- nextCommand value in Commands object will be set to COMMAND_SEND_FILE_LISTServer
Upon receiving the file list request, the server will read all the files (no directory) in the server's shared directory and wrap each file name and corresponding size in FileInfo object. DirInfo object will have a variable named fileList with type of List(implementation ArrayList). Server will write DirInfo object to socket's ObjectOuputStream so that client can read it from ObjectInputStream.DirInfo and FileInfoclass have to implement Serializable interface as these will be transferred over the network.
Client will read DirInfo object from ObjectInputStream and populate the JList on "Remote File List" panelwith file names. At the same time, each fileName and corresponding fileSize should be saved in a HashMap.Once the JList is loaded and the user double clicks a file name in the JList, client will send a Commands object to server (by writing to ObjectOutputstream) with following values:- nextCommand value in Commands object will be set to COMMAND_SEND_FILE- fileName should be set with the double-clicked file name from the JList
Server
Upon receiving send file request (will read Commands object from ObjectInputStream), the server will read the nextCoomand and fileName from Commands object and start transferring the file bytes to client by writing to OutputStream (Could be wrapped into a BufferedOutputStream for efficiency).
Client will read file binaries from InputStream(not ObjectInputStream) and finish reading when number of bytes read is length of the corresponding file name. The file length can be derived by passing the fileName to HashMap where file length was stored earlier while populating the JList based on DirInfo object received from server. Once the file content is read it will be then saved in the download directory on client machine.
Round Trip Time (RTT) and Time Out The size and the complexity of computer networks have grown in past years. To achieve an efficient and reliable transmission some
VLAN ( Virtual Local Area Network) is a concept of creating distinct broadcast domains. It is a network which aims at partitioning the physical network. VLAN comprises all the attr
Networks Edge and Technologies Network Edge provides information exchange between the access network and the core network. The devices and facilities in the network
Q. How is computer networks used in teleconferencing? Teleconferencing: Teleconferencing allows conference to happen without the participants being in the same place. Applica
What is meant by Middleware? Middleware is a distributed software needed to support interaction between clients and servers. In short, it is the software that is in the middle
a) Peer-to-Peer Network Computers can act as both servers sharing resources and as clients using the resources. b) Server-based Network Give centralized control of netwo
Categories of address forms: STATIC: In this type the hardware manufacturer gives permanent physical address to every network manufacturer and interface must ensure th
Determine about the TCP/IP Stands for Transmission Control Protocol/Internet Protocol. This is the group of protocols that define the Internet and communication method used
Q. What is Two Types of Errors? Single-Bit Errors: Merely one bit in the data unit has changed Burst Errors of length 'n': 2 or more bits in the data unit have changed (
Identify the 3 major functions at layer 3 of the OSI model Ans) Layer three explains the path, forwards the packet and executes software / logical addressing.
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd