Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #597 // Stub HTTP server

JavaX source code - run with: x30.jar

1  
import com.sun.net.httpserver.HttpServer;
2  
import java.net.InetSocketAddress;
3  
4  
public class main {
5  
  private static HttpServer server;
6  
  private static int port = 8080;
7  
8  
  public static void main(String[] args) throws Exception {
9  
    server = HttpServer.create(new InetSocketAddress(port), 0);
10  
    server.setExecutor(null); // creates a default executor
11  
    server.start();
12  
    System.out.println("HTTP server started (listening on port " + port + "!)");
13  
  }
14  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

Comments [hide]

ID Author/Program Comment Date
748 #1000610 (pitcher) 2015-08-18 00:07:07
747 #1000604 (pitcher) 2015-08-20 15:28:24

add comment

Snippet ID: #597
Snippet name: Stub HTTP server
Eternal ID of this version: #597/1
Text MD5: e58235c54d96fb57a620d4414335a9b7
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-04-30 16:13:37
Source code size: 472 bytes / 14 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 929 / 1163
Referenced in: [show references]