Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Hmm...

Name: Anonymous 2007-11-06 8:54

It isn't quite...ENTERPRISE enough...

import java.io.*;
import java.net.*;


public class PortListener extends Thread
{
  public static void main(String[] args) throws Exception
  {
    ServerSocket serverSocket = new ServerSocket(Integer.parseInt(args[0]));
    Socket inSocket = serverSocket.accept();

    BufferedReader in = new BufferedReader(new InputStreamReader(inSocket.getInputStream()));

    while (true)
    {
      while (in.ready())
        System.out.println(in.readLine());
      sleep(500);
    }
  }
}

Name: Anonymous 2007-11-06 22:14

>>2
obj-c is actually quite rad, that's just a shitty enterprise example.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List