Skip to content

Instantly share code, notes, and snippets.

@vanjikumaran
Created August 12, 2013 12:28
Show Gist options
  • Select an option

  • Save vanjikumaran/6210408 to your computer and use it in GitHub Desktop.

Select an option

Save vanjikumaran/6210408 to your computer and use it in GitHub Desktop.
import java.io.*;
import java.net.*;
/**
* Created with IntelliJ IDEA.
* User: vanji
* Date: 5/17/13
* Time: 9:31 AM
*/
public class Server
{
public static void main(String[] args) throws Exception
{
Socket socket = new ServerSocket(12345).accept();
OutputStream out = socket.getOutputStream();
out.write("Hello World\n".getBytes());
out.flush();
out.close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment