package smserve_main;

import java.net.Socket;
import java.net.ServerSocket;
import java.util.Vector;

import smserve_plugins.SMbackup;
import structures.Messagequeue;

public class SMserve{
	public static Vector<String> users = new Vector<String>();
	public static Vector<Messagequeue> mails = new Vector<Messagequeue>();
	public static Vector<Messagequeue> foreignm = new Vector<Messagequeue>();
	public static void main(String[] args) {	
		Socket client;
		ServerSocket server;
		SMbackup backup =  new SMbackup();
		backup.start();
		users=new Vector<String>();
		System.out.println("Starting smserve V0.1");
		try{
			server = new ServerSocket(22333);
		while(true) {
			try {
				client=server.accept();
				(new Clienthandle(client)).start();
			}catch(Exception e1){System.out.println(e1);}}
		}catch(Exception e2){System.out.println(e2);}
	}
}
