/* * chatclientTCP.c * chatserverTCP.c * * Created on: Feb 2013 * Author: Matteo Ruggero Ronchi * * Copyright 2013 Matteo Ruggero Ronchi * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * Like any free software license, the Apache License allows the user of the software * the freedom to use the software for any purpose, to distribute it, to modify it, * and to distribute modified versions of the software, under the terms of the license. * * The Apache License, does not require modified versions of the software * to be distributed using the same license (in contrast to copyleft licenses). * * In every licensed file, any original copyright, patent, trademark, * and attribution notices in redistributed code must be preserved * (excluding notices that do not pertain to any part of the derivative works), * and, in every licensed file changed, a notification must be added stating that changes have been made to that file. * * If a NOTICE text file is included as part of the distribution of the original work, * then derivative works must include a readable copy of these notices in at least one of three places: * - within a NOTICE text file distributed as part of the derivative works * - within the source form or documentation * - within a display generated by the derivative works (wherever such third-party notices normally appear). * * The contents of the NOTICE file do not modify the license, as they are for informational purposes only. * Modifications may have appropriate copyright notices, and may provide different license terms for the modifications. * */ /* * * Feel free to contact me for any kind of explanation request, suggestion, or bug individuation: * * - email address: matrronchi.license@gmail.com * - skype account: matteorr * */ /* * To execute program please use following instruction in the correct order: * - $> ./chatserverTCP 'IP' ['port'] * * - $> ./chatclientTCP 'wanted client host name' 'IP' * ... * - $> ./chatclientTCP 'wanted client host name' 'IP' * * Execution will result in the setup of a single multithread server managing a number of clients who will be able to send messages and status requests between them * 'IP' and 'port' should be the ip address and port on which the server is listening for incoming clients. Each client should specify its client name and the server to which connect * */
matteorr/MultiThreadChat
A Client / Server Multi Thread C Implementation for sending simple text messages over a TCP socket
C