Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*    */ package org.jboss.net.sockets;
 /*    */ 
 /*    */ import java.io.IOException;
 /*    */ import java.net.InetAddress;
 /*    */ import java.net.ServerSocket;
 /*    */ import java.net.Socket;
 /*    */ 
 /*    */ public class TimeoutServerSocket extends ServerSocket
 /*    */ {
/*    */   public TimeoutServerSocket(int port)
/*    */     throws IOException
/*    */   {
/* 39 */     this(port, 50);
/*    */   }
/*    */ 
/*    */   public TimeoutServerSocket(int portint backlogthrows IOException
/*    */   {
/* 44 */     this(portbacklognull);
/*    */   }
/*    */ 
/*    */   public TimeoutServerSocket(int portint backlogInetAddress bindAddrthrows IOException
/*    */   {
/* 49 */     super(portbacklogbindAddr);
/*    */   }
/*    */ 
/*    */   public Socket accept() throws IOException
/*    */   {
/* 54 */     Socket s = super.accept();
/* 55 */     s.setSoTimeout(1000);
/* 56 */     TimeoutSocket ts = new TimeoutSocket(s);
/* 57 */     return ts;
/*    */   }
/*    */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
 * Qualified Name:     org.jboss.net.sockets.TimeoutServerSocket
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X