https://github.com/droyder7/chat-application-using-socket-programming
Chat Application using Socket Programming in C & Java. Client Server user level application, can be used to communicate between two connected systems.
https://github.com/droyder7/chat-application-using-socket-programming
c socket socket-programming socket-server
Last synced: 5 months ago
JSON representation
Chat Application using Socket Programming in C & Java. Client Server user level application, can be used to communicate between two connected systems.
- Host: GitHub
- URL: https://github.com/droyder7/chat-application-using-socket-programming
- Owner: Droyder7
- Created: 2020-02-22T06:12:11.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-22T12:08:04.000Z (almost 6 years ago)
- Last Synced: 2023-12-23T19:27:36.410Z (about 2 years ago)
- Topics: c, socket, socket-programming, socket-server
- Language: C
- Homepage:
- Size: 31.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
=======================================================
CHAT APPLICATION USING SOCKET PROGRAMMING
=======================================================
This is a client - server user-level application using Socket Programming in C & Java.
Server accepts massages in form of strings from clients (even multiple
strings from each client) and can reply by sending server massages to the connected client.
For example:
Client may send "Hello Server" and the server may reply with "Hi Client" and vice versa.
Both server and client(s) output's both sending & receiving strings on the terminal.The server and client processes can run on same or
different machines.
Helper Functions:
(1) void error(char *msg)
To report any kind of error along with the massage containing the cause of the error.
=======================================================
USAGE
=======================================================
Usage of Server in C:
The default PORT number of server is 1234
To connect to different PORT number, the PORT number is to be passed as command line argument while executing the server process.
Ex: ./server 11001
Port is set to : 11001
Usage of Client in C:
The default Server IP address is 127.0.0.1 (localhost) and PORT number is 1234 in client program.
Ex: ./client
Server is set to : 127.0.0.1
Port is set to : 1234
To connect to different IP address & PORT number of a server, the IP address and PORT number of server is to be passed as command line argument while executing the client process, .
Ex: ./client 172.16.4.12 11001
Server is set to : 172.16.4.12
Port is set to : 11001
=======================================================
OUTPUT
=======================================================
At Client End:
Server is set to : 127.0.0.1
Port is set to : 1234
Enter the message for Server : Hello Server
Massage Sent!
Enter the message for Server :
Massage from Server : Hi Client
At Server End:
Port is set to : 1234
Enter a massage for client :
Message from Client: Hello Server
Hi Client
Massage Sent!
=======================================================
NOTE
=======================================================
Multiple client processes can connect to the same server but not at the same time. When one client get disconnected then another client can connect to the server.