C++ Sockets – Create simple server and client chat (Linux)
This is simple console server and chat client. This was my second semester final project, so I thought I’ll share with you.
Compiler: G++ Compiler
===== SOURCE FILES =====
https://github.com/hassanyf/Simple-Server-and-Chat-Program
Project Members:
Nabeel Hussain
Zain Mohsin
Thank you.
by Hassan Yousuf
linux web server
hai, can this chatroom that using socket programing can be done in virtualbox?
this has saved my life thanks man
This is awesome. Would've been even more helpful if you explained the code line by line
The links to download don't work, might want to try something else, maybe github?
I love you
Pro tip: turn off sound
This code limits server and client to enter one message at a time. A server or client cant send more than one message.
Use threads instead
please upload multi client communication using single sever in c++
the links are not working. Source files are not reachable. Can you please share them again?
hey, can you tell me what socket programming project other ? except chat program?
The codes you wrote are buggy(e.g. sock.addr.sock_addr.s_addr instead of sock_addr.sin_addr.s_addr, and four or five others), plus upload the original codes of what you later compiled in your video, thx:)
sir plz send this code on " meitspiya@rediffmail.com "as soon as possible plz .. i have to submit it to my lecturer by monday .. anyone plz send ths to me .. thanx in advance
How to install a compiler on a Linux server and embed that compiler to one website do anyone know if yes then the person is thankful to answer my question
not able to get the code, shows url not found, can you help.
hmm…can you do a video to create a server for android app client? plz?
can we use this program and send messages between two PCs which are connected through LAN??
Thank you very much for the nice video shared! One dumb question. that "127.0.0.1" has to be the ip address of the machine where server locates at , right? Thanks a lot.
I got a problem with a buffer overflow.
Assalam'aleyk brother
i have one question. i know this for linux, but can it be run on windows? does the code has special character or anything that make these only for linux?
thank you in advance bro ! this is exactly my project
Hi,
looks amazing programs, I would like to test these, but I couldn't download the programs through the links provided. what shall I do?
Best tutorial I've seen so far.
hello Hassan, i need your help for my project, can i ask you a few question about server and client?
how can I make it work to communicate with another computer outside my LAN? btw, nice work and thanks for sharing!
Hassan Thank you for this video.I can connect server client on the same pc.But my purpose is communication from different computers. I want to connect ip="192.168.X.X" .how can i do this?
Where did you use the ip in client side?
I need to connect to a specific host like "server1.domain.com" how can I do that?
great work brother it is very helpful for me…..
nice video, but links to source follow to executable files
what software did you write this in
i used the file you putted in the description of the video but when i try to run them i got stuck D:
the client says => Socket client has been created… and then stops
the server says => Socket server has been created…
=> Looking for clients…
sorry if this is just a my error 😀
What ?! Because he doesn't make me Download the file on ADF.LY ?
…
Thank you guys for The answere
Mine won't connect.
hello I getting error while compiling the client.cppclient.cpp: In function ‘int main()’:
client.cpp:18:13: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
char *ip = "127.0.0.1";
^
client.cpp:36:34: error: invalid conversion from ‘int’ to ‘void*’ [-fpermissive]
recv(client, bufsize, bufsize, 0);
^
In file included from client.cpp:4:0:
/usr/include/x86_64-linux-gnu/sys/socket.h:156:16: error: initializing argument 2 of ‘ssize_t recv(int, void*, size_t, int)’ [-fpermissive]
extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags);can you help me?? thank you
Is there a way to make it so that you can have two different computers communicate with each other through this, or it will only work with two terminal windows side by side
Really nice video, thank you. I study at UNB from capital of Brasil (Brasilia), we are doing some work about server and clints, professor did not help too much but your video did. Keep sharing your work with us, it really help.