Server.java 501 Bytes
Newer Older
Michele Fiori's avatar
Michele Fiori committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
package actor;

import it.ewlab.actor.ActorOuterClass.Actor;

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

public class Server {

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

        System.out.println("The server is running...\n");

        ServerSocket serverSocket = new ServerSocket(9999);

        Socket s = serverSocket.accept();

        Actor actor = Actor.parseFrom(s.getInputStream());

        System.out.println(actor);
    }


}