-
Notifications
You must be signed in to change notification settings - Fork 0
Server class
Matěj Bucek edited this page Mar 18, 2020
·
1 revision
This class creates ServerSocket and handles connections with Handler class.
Parameter is port, which ServerSocket will listen on.
Server server = new Server(8080);
Methods:
- Start - Tells server to start listening on given port.
server.start();
- Close - Close server.
server.close();
- Add EndPoint - Parameter is class, which implements ServerEndPoint Class.
server.addEndPoint(ServerEndPoint);
- Set EndPoints - Parameter is ArrayList filled with your ServerEndPoints.
server.setEndPoints(ServerEndPoint);
Matěj Bucek © 2020 mBucek.cz