Skip to content

moocf/tcp-echo.cxx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A multi-echo supporting TCP echo server and client.


## SERVER
$ clang main.cxx
$ ./a.out server

# Server listening on port 5000
NOTE: Now start the client in another terminal
# Client connected: 127.0.0.1:49847
# Received message: Hello, World! (13 bytes)
# Sent echo: Hello, World! (13 bytes)
NOTE: You can start multiple clients, each in a separate terminal
# Client connected: 127.0.0.1:49848
# Received message: Hello, World! (13 bytes)
# Sent echo: Hello, World! (13 bytes)

## CLIENT 1
$ ./a.out client

# Sent message: Hello, World! (13 bytes)
# Received echo: Hello, World! (13 bytes)

## CLIENT 2
$ ./a.out client

# Sent message: Hello, World! (13 bytes)
# Received echo: Hello, World! (13 bytes)



ORG

About

A multi-echo supporting TCP echo server and client.

Resources

License

Stars

Watchers

Forks

Languages