Skip to content

Instantly share code, notes, and snippets.

View MarcusTalbotNL's full-sized avatar

Marcus Talbot MarcusTalbotNL

  • Wassenaar, The Netherlands
View GitHub Profile
@MarcusTalbotNL
MarcusTalbotNL / ChatServer.java
Created April 21, 2017 21:34
Basic setup to get chat-server up and running
/*
* Hey there @aeren108, I saw your question on Reddit, so I thought this might be the easiest way to help you out a bit.
* I promise this won't be a complete solution, but will only give you a push in the right direction!
*/
public class ChatServer { //First, we will need a ServerSocket to listen for connecting Sockets.
private static final int DEFAULT_PORT = 1337; // In Java, the basic way to create a constant (without the
// use of enumerables) is to use the keywords private and static.