Server.java 465 Bytes
Newer Older
1 2
package researcher;

Gabriele Civitarese's avatar
Gabriele Civitarese committed
3
import it.ewlab.researcher.ResearcherOuterClass.Researcher;
4 5 6 7 8 9 10 11 12 13 14 15 16 17

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

public class Server {

    public static void main(String[] args) throws IOException {


        ServerSocket serverSocket = new ServerSocket(9999);

        Socket s = serverSocket.accept();

Gabriele Civitarese's avatar
Gabriele Civitarese committed
18
        Researcher r = Researcher.parseFrom(s.getInputStream());
19 20 21 22 23 24

        System.out.println(r);
    }


}