Multiple Client Server Program in C using fork | Socket Programming

preview_player
Показать описание
In this video, we are going to build a client-server program in the C programming language to communicate over the network. Here the server is going to be a concurrent server, which has the ability to handle multiple clients at the same time using the fork system call. The client is going to a simple program that sends a message to the server and the server send the same message back to the client.

An echo server is a server that sends back the same message that the client has sent the server.
Like:
Client send - abc
Server recv - abc

FOLLOW ME:

MY GEARS:
Рекомендации по теме
Комментарии
Автор

this video is good, it's like milky way

mwesigyerob
Автор

I love you. You saved me on a big assignment for handling multiple clients with sockets for my last class to graduate. Thank you.

manvelbeaver
Автор

Thank you!! For helping many people through your explanation

PTeja-trqw
Автор

Thank you so much . You solve my problem .

tuhinsubhrahazra
Автор

there is a buffer overflow when using scanf("%s", buffer); because scanf("%s") doesnt check how many bytes are entered. may result in a DoS or remote code execution.

XeRo
Автор

Hi sir, the way you speak is so funny by the way informative video thanks

asifshahzad
Автор

Thanks, helped to understand sockets in Linux

Vadim
Автор

Sorry, why did you close the sockfd socket after fork call?

hirenpatel
Автор

Great video you're very clear and concise, helped a lot!!

anguswylie
Автор

I don't understand why the server's socket is closed while it is still needed. Can someone explain why is that?

mehdicharife
Автор

This is good one. Keep doing god work !

entropy
Автор

is it possible for the cilient to chat with each other? if yes, how?

hussef_sef
Автор

Can you please elaborate more on what does code do at line 56, fork creates a new process and we are closing the child but receiving the data inside child only, how is this working? there is no code to execute for parent process

ArtsyRiyanshi
Автор

Thank you very much
This lesson is very important
God bless you
We will not deny you.

abdullahhussein
Автор

thank you so much you were very helpful

nihedzioua
Автор

Hello, how would I approach making the server ask the client for a name so that "printf" would print the client's name that was received instead of printing "client:"

switchups
Автор

Can we also read the data from first client to another client in socket ?

namangoel
Автор

you are a fantastic, thank you very much I have a question, I don't know if you can help me but I want to know how to create multiple processes that connect to the apache web server, establish a connection and keep it waiting, just wait for the server timeout, and when the connection is lost, the process should restart it.

In the end what I want is to see the simultaneous connections the web server can support, using a C language and fork () processes, the parent process will count how many processes achieve controls and many don't.

gamezone
Автор

Nice Video, Can you limit the connection to 100 client in same time only? Can you do this example please?

Автор

Super cool thanks could you make an explanatory video on how to implement a multiplayer mode with sockets in a game c ?

Chris_Data_Insights