package org.ourfilesystem.com;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class SimpleServerSocket implements OFSServerSocket {

	private ServerSocket Server;
	
	public SimpleServerSocket(ServerSocket server) {
		Server = server;
	}
	
	@Override
	public OFSSocket accept() throws IOException {
		Socket s = Server.accept();
		if (s != null) {
			return new SimpleSocket(s);
		}
		return null;
	}

	@Override
	public void close() throws IOException {
		Server.close();
	}

}
