Socket Programming in C, C++ Part 2 (socket, bind, about sockaddr_in, listen etc)

preview_player
Показать описание
Start writing your server code!!
In this video, I have covered about the system calls/functions which are used to initialize a socket environment in C/C++ socket program
In case you are writing your code in C/C++ Windows platform (unlike Linux), then you need to use the WSA calls (like WSAStartup ) with WSADATA initialized with the version of your choice and requirement.
Discussed about the struct sockaddr and struct sockaddr_in and how to set the address family with this structure and how to set the port numbers (in Network byte order). How to set your local IP Address with INADDR_ANY as it internally converts the address and assign it to sockaddr_in with network byte order.
After binding, you need to set it to listen on the port for incoming connections!!
Best of luck and
Happy Learning!!!! :)
Рекомендации по теме
Комментарии
Автор

Explained better in 20mins than my faculty assistaint in 3 months.

urospetrov
Автор

Only one indian you tube channel that is explain exactly what biggner students are want it's reliable. thanks a lot. Keep growing 🎉

veerpuri_
Автор

Great explanation!!! Thank you so much!

ramyaby
Автор

Top teir content with great explination!!

jay-rey
Автор

very understandable. Thanks for this video.

redjohnsfriend
Автор

i'm unable to find out socket server property in visual studio code is it there or not ? which ide you are using? sir!

devgyan_
Автор

Sir, It would be really great if you could provide link to the playlist related to library concepts above in description or as a comment or as a hyperlink.

asura-
Автор

Can you please do the same thing for Linux?

jos
Автор

Which IDE i Would LIke To took like a WIn32 EMpty project r Console Application

rakeshroshan
Автор

is it Complete Playlist for socket programming ?

fanforeverclips
Автор

how to find project in menu bar on vs? how to find project property page also? please help. i cant download relatable winsock file

dd
Автор

Sir which library we have to use on linux (socket.h??)

AniketMohan
Автор

thanks for your tutorial. but i have a question, can i use "sockaddr_in srv;" instead of "struct sockaddr_in srv;"? and why.

ІП-ВладКириченко
Автор

I can do the programming in IDE na like (Code Blocks / Dev C++) ?

saurabhdhote
Автор

i am currently using vscode version 1.48 and cannot find from where to add the ws2_32.dll library...the program keeps giving me undefined reference to `__imp_socket' error...there is no project tab or add dependency option

ayushkumar
Автор

Great lecture..
One question, why haven't you used winsock2. Are there any advantages of using winsock over winsock2?

shilpaaggarwal
Автор

Hey!! In the lastest version of VSCode, I couldn't find the Project section to go down to the Linker part in the start of your video. Can you help me with that?

souravjagati
Автор

I can't find project and build settings in menu bar of vs code, so I am unable to add additional configurations. CAn you please help me with this or tell me any other way, please.

ishqmubarak
Автор

the program is not working
winsock2.h file not found error

infini
Автор

sir why my code is not working in vs code

KRISHNAKUMAR-hiii
join shbcf.ru