Skip to content

twilight1794/qotd-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qotd-server

This is a TCP implementation of the Quote of the Day protocol in C++, Node.js, Java and Scala. They listen on port 17 and send a random quote from qotd.txt.

Try it out

To run the C++ version:

make qotd
sudo ./qotd # You need to use sudo so it can run on port 17

To run the Node.js version:

sudo node qotd.js # You need to use sudo so it can run on port 17

To run the Java version:

javac QOTD.java
sudo java QOTD

There also exists a multi-threaded Java version:

javac MultiThreadedQOTD.java
sudo java MultiThreadedQOTD

To run the Scala version:

scala qotd.scala

To try it out run:

nc localhost 17

Live Demo

I also have a live demo of the C++ version at hashanp.xyz:

nc hashanp.xyz 17