https://github.com/dheovani/tcpsocket
TCP socket in C
https://github.com/dheovani/tcpsocket
c c-socket clan socket socket-communication socket-programming
Last synced: 11 months ago
JSON representation
TCP socket in C
- Host: GitHub
- URL: https://github.com/dheovani/tcpsocket
- Owner: Dheovani
- License: mit
- Created: 2024-03-23T02:06:13.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-23T10:59:03.000Z (about 2 years ago)
- Last Synced: 2025-03-13T11:23:49.767Z (about 1 year ago)
- Topics: c, c-socket, clan, socket, socket-communication, socket-programming
- Language: C
- Homepage:
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# My TCP Socket in C
This is a simple example of a TCP server in C using the Winsock library on Windows.
## What does it do?
- Accepts client connections on a specific port
- Receives messages from clients and prints them
- Sends a fixed "Hello, World!" response message to clients
## Try it out
1. Clone this repository:
```
git clone https://github.com/Dheovani/TCPSocket.git
```
2. Compile the source code:
- Open the command prompt
- Navigate to the project directory
- Run the compilation command, for example:
```
gcc main.c -o socket.exe -lws2_32
```
3. Run the server
4. Connect to the server using a TCP client, such as your internet browser:

## License
This project is licensed under the [MIT License](LICENSE.txt).