Git Product home page Git Product logo

tcp-socket-chat-app's Introduction

TCP-Socket-Chat-App

CLI chat app using tcp socket programming in C

Client - Server application allowing for messaging between computers on port 9006. Both the client and server send messages, and the application is terminated once the client exits, or the server sends 'quit'.

Compilation

gcc server.c -o server
gcc client.c -o client

Usage

Server:

./server

Client:

./client server_ip_address

Example

This is an example of me messaging my own computer.

Server:

Wills-MBP:http_server willryan$ ./server
Welcome to the chat app
Author: Will Ryan

+++++++++++++ Waiting for a new client connection +++++++++++++

--------------- A new client has been accepted! ---------------

127.0.0.1 : Hello, this is a message from the client
You: This is a message from the server
127.0.0.1 : Great!
You: quit
Wills-MBP:http_server willryan$

Client:

Wills-MBP:http_server willryan$ ./client 127.0.0.1
Welcome to the chat app
Author: Will Ryan

+++++++++++++++ Connected to the server +++++++++++++++

------ Write a message to begin the conversation ------

You: Hello, this is a message from the client
127.0.0.1 : This is a message from the server
You: Great!
127.0.0.1 : quit
Wills-MBP:http_server willryan$ 

When the computers are different, then the ip's will not be the loopback address, 127.0.0.1.

tcp-socket-chat-app's People

Contributors

willryan1 avatar

Stargazers

iy88 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.