November 25, 2024, 10:20:42 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Make a Client/Server application  (Read 5537 times)

Offline Pashaa

  • New Member
  • Posts: 2
Make a Client/Server application
« on: December 29, 2010, 03:34:03 PM »
Hi,
Can  any one send   me    guide  me   about   it.
How   me   write   the  code in  cpp  of  this  Question.
Q:
Make a Client/Server application with the following specifications. In this assignment we will be
developing a file transfer client-server application using UDP sockets. Unlike TCP, UDP has no
mechanism for reliable and in-sequence delivery therefore you have to make this client/server
model to operate over UDP but have mechanism for reliable and in-sequence delivery.
The server will only be able to handle one client at a time (sequential server).
The server must bind on port number 9999.
When the connection is established; client will send a request for a file transfer from the
server, by sending the name of the file.
The client will first send the length of the name of the file to the server in two
bytes.
It will then send the file name to the server.
If the file is found at the server, the server will send an ACK to the client; else it will send
NACK to the client and will terminate the connection.
If the client receives ACK from the server, it will start waiting for the file data from the
server; else it will terminate its connection with the server.
In case the file is present at the server, the server will start sending file to the client. The
server will continuously send the data to the client till it reaches the end of file.
The client will then start receiving the data of file sent by the UDP server and write
(append) the data in file.
After writing all the data in the file, the client will terminate its connection from the
server.
Make sure you assemble the file correctly and got the file completely. Any text file is
acceptable as transmission.


Answer:
If   anyone  of  you are   write  the   code  in cpp then   plz   send  me at  my   email  id:
I  shall be   thankful  to  you for  consideration.
Thanks!!

Offline Pashaa

  • New Member
  • Posts: 2
Re: Plz guide me about it.!!!
« Reply #1 on: December 29, 2010, 03:35:04 PM »
Hi,
Can  any one send   me    guide  me   about   it.
How   me   write   the  code in  cpp  of  this  Question.
Q:
Make a Client/Server application with the following specifications. In this assignment we will be
developing a file transfer client-server application using UDP sockets. Unlike TCP, UDP has no
mechanism for reliable and in-sequence delivery therefore you have to make this client/server
model to operate over UDP but have mechanism for reliable and in-sequence delivery.
The server will only be able to handle one client at a time (sequential server).
The server must bind on port number 9999.
When the connection is established; client will send a request for a file transfer from the
server, by sending the name of the file.
The client will first send the length of the name of the file to the server in two
bytes.
It will then send the file name to the server.
If the file is found at the server, the server will send an ACK to the client; else it will send
NACK to the client and will terminate the connection.
If the client receives ACK from the server, it will start waiting for the file data from the
server; else it will terminate its connection with the server.
In case the file is present at the server, the server will start sending file to the client. The
server will continuously send the data to the client till it reaches the end of file.
The client will then start receiving the data of file sent by the UDP server and write
(append) the data in file.
After writing all the data in the file, the client will terminate its connection from the
server.
Make sure you assemble the file correctly and got the file completely. Any text file is
acceptable as transmission.


Answer:
If   anyone  of  you are   write  the   code  in cpp then   plz   send  me at  my   email  id:
I  shall be   thankful  to  you for  consideration.
Thanks!!