return s;
}
+ public Socket accept(tag td) {
+ Socket s=new Socket(){}{td};
+ int newfd=nativeaccept(s);
+ s.setFD(newfd);
+ return s;
+ }
+
+ /* Lets caller pass in their own Socket object. */
+ public void accept(Socket s) {
+ int newfd=nativeaccept(s);
+ s.setFD(newfd);
+ }
+
private native int nativeaccept(Socket s);
public void close();