Server.java 443 Bytes
Newer Older
Luca Arrotta's avatar
Luca Arrotta committed
1
package actor;
Riccardo Presotto's avatar
Riccardo Presotto committed
2

Luca Arrotta's avatar
Luca Arrotta committed
3
import it.ewlab.actor.ActorOuterClass.Actor;
Riccardo Presotto's avatar
Riccardo Presotto committed
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();

Luca Arrotta's avatar
Luca Arrotta committed
18
        Actor actor = Actor.parseFrom(s.getInputStream());
Riccardo Presotto's avatar
Riccardo Presotto committed
19

Luca Arrotta's avatar
Luca Arrotta committed
20
        System.out.println(actor);
Riccardo Presotto's avatar
Riccardo Presotto committed
21 22 23 24
    }


}