Package com.rcll.protobuf_lib
Class ProtobufServer
- java.lang.Object
-
- com.rcll.protobuf_lib.ProtobufServer
-
- All Implemented Interfaces:
java.lang.Runnable
public class ProtobufServer extends java.lang.Object implements java.lang.Runnable
-
-
Constructor Summary
Constructors Constructor Description ProtobufServer(int listenPort, RobotConnections robotConnections, java.util.function.Consumer<java.net.Socket> onNewConnection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun()voidsend_to_robot(long robot_id, ProtobufMessage msg)<T extends com.google.protobuf.GeneratedMessageV3>
voidsend_to_robot(long robot_id, T msg)voidstart()
-
-
-
Constructor Detail
-
ProtobufServer
public ProtobufServer(int listenPort, RobotConnections robotConnections, java.util.function.Consumer<java.net.Socket> onNewConnection)
-
-
Method Detail
-
start
public void start() throws java.io.IOException- Throws:
java.io.IOException
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
send_to_robot
public void send_to_robot(long robot_id, ProtobufMessage msg)
-
send_to_robot
public <T extends com.google.protobuf.GeneratedMessageV3> void send_to_robot(long robot_id, T msg)
-
-