项目作者: mathewkramsch

项目描述 :
TCP and UDP Socket Programming in C
高级语言: C
项目地址: git://github.com/mathewkramsch/cs176a_hw2.git
创建时间: 2021-04-20T19:11:29Z
项目社区:https://github.com/mathewkramsch/cs176a_hw2

开源协议:

下载


CS 176A: Homework 2

Socket Programming in C

This program is used for communication between a client and server with one program using UDP and one using TCP. The client sends a string of numbers to the server and the server adds up the numbers and then sends them back to the client until there is only one digit left.


Usage:

Client Input/Output:

Input:

  1. ./client IP PORT

Example:

  1. csil-machine2> ./client_c_udp 128.111.49.44 32000
  2. Enter string: 123456789101234567891012345678910

Output:

  1. From server: 138
  2. From server: 12
  3. From server: 3
  4. csil-machine2>

Server Input:

  1. ./server_c_udp PORT

Example:

  1. csil-machine1> ./server_c_udp 32000