Sedang Disiapkan

C++ Client-Server Architechture with Sockets on Linux

uses a client-server architecture to implement the tokenizer system. The client and server will communicate using sockets. Use the same struct’s defined for the previous assignments to handle strings and tokens.

As in Project 2, the parent program (on the client machine) will handle the string input and the tokenizer, both in threads as before and communicating with queues. Use a third thread handle sending the tokenStruct’s to the server; this will require a new queue. The parent must handle two command line parameters that indicate the server’s name (or address) and the port number, in the form –s server and –p portnumber. Make sure that the socket connection is successful before spawning either thread; if not, report an error and quit. Otherwise, the server runs “forever” – that is, when the quit command is received, only the worker thread quits – the server continues to listen for connections.

The server program will take one command line parameter to the server to indicate what port number to use, in the form –p portnumber. As with the client, make sure that the socket initialization is successful before spawning the threads. If it is, display the port number to the screen; if not, report an error and quit. Note that the port number may be in use; only port numbers above 1024 are allowed; you can, if you wish, add a port stepper – a loop that increases the port number until a successful one is found. Also note that the server must be started in the background (add an & to the end of the command), before any client is started, and the server must be killed manually with the kill -9 %pid command. Otherwise, the server runs “forever” – that is, when the quit command is received, only the worker thread quits – the server continues to listen for connections.

The server will use three threads – one to handle incoming messages, started after the accept( ) call; the other two threads are the token classifier/printer and the token counter. These threads will communicate using shared memory queues.

Kemahiran: Pengaturcaraan C, Pengaturcaraan C++, Linux, Kejuruteraan Perisian

Lihat lebih lanjut: client server linux, linux socket server, socket thread architecture server, linux socket shared memory, shared memory client server, linux server socket thread command client, client server thread linux, linux socket server thread, client server socket linux, what is a string in programming, what is a loop in programming, three p, thread programming, struct c programming, strings in c programming, string programming, string in c programming, string c programming, socket programming in c, socket programming c#, programming on linux, programming loop, programming in linux, programming for linux, pid programming

Tentang Majikan:
( 1 ulasan ) Jonesborough, United States

ID Projek: #1535305

Dianugerahkan kepada:

jeffreyr97

Expert C/C++ networking developer. Please see PMB.

$60 USD dalam 3 hari
(3 Ulasan)
2.0

7 freelancers are bidding on average $131 for this job

lbear9090

Hi I have 7 years experience in C\C++ programming. And also Linux and Windows App programming. Let's start. Thanks.

$250 USD dalam 5 hari
(22 Ulasan)
5.3
honeypotant

I am linux netowrk expert. I have rich experience in client/server socket. I can start immediately. Regards.

$250 USD dalam 5 hari
(10 Ulasan)
4.7
argento

Hi, please check PMB. Thanks.

$150 USD dalam 7 hari
(20 Ulasan)
4.7
diamond1027

Hi, I am expert of C/C++ network. I have rich experience develop network communication. Regards.

$250 USD dalam 5 hari
(3 Ulasan)
3.7
YhDVo72I3

Check PMB please.

$250 USD dalam sehari
(0 Ulasan)
0.0
tuanhai9588

Hi, I have some experience in develop socket in linux. So, I have just done c++ chat application in ubuntu. And now I think I can apply it to your project. Do you hear boost c++ lib which is the best c++ lib in curren Lagi

$100 USD dalam 6 hari
(0 Ulasan)
0.0
rAhultAnwAr

Hi... i have already worked on this. i can do it better.

$100 USD dalam 3 hari
(0 Ulasan)
0.0
amirchaudhary

I am expert in POSIX threads and Linux based programming. Please see PM

$60 USD dalam 2 hari
(0 Ulasan)
0.0
lizixing117

Hi. I have many experiences in linux programming and linux system management. I check your question an i will give you a good result. Why don't you award me? I will wait for your reply. You can saw PBM Sincerely.

$200 USD dalam 5 hari
(0 Ulasan)
0.0