s
Posts: 23
Nickname: codemonkey
Registered: Nov, 2003
|
|
Re: Socket
|
Posted: Nov 6, 2003 1:55 PM
|
|
Be sure that nothing else (like lets say a WEB SERVER) is running on port 80 of the server this code is running on...
byte[] ip = {161,6,11,232}; InetAddress address = InetAddress.getByAddress(ip); int noOfClients = 10; //or whatever ServerSocket server = new ServerSocket(80,noOfClients,address); while(true){ Socket s =server.accept(); try{ InputStream in = s.getInputStream(); OutputStream out = s.getOutputStream();
//sabab, i have no idea what you are trying to accomplish in //your server but this is where you would do the meat //of your work! //If you couldnt figure this out, //I doubt you will be doing anything of value in here... //I pray that some clueless company is not paying you for //your "expertise"
}catch(InterruptedException ie){} }
|
|