Package org.miaixz.bus.socket
Class Worker
java.lang.Object
org.miaixz.bus.socket.Worker
-
Constructor Summary
ConstructorsConstructorDescriptionWorker(BufferPagePool writeBufferPool, int threadNum) Worker(BufferPage readBufferPage, BufferPagePool writeBufferPool, int threadNum) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRegister(Consumer<Selector> register) 注册事件booleandoRead(UdpChannel channel) voidvoidrun()voidshutdown()停止服务
-
Constructor Details
-
Worker
- Throws:
IOException
-
Worker
public Worker(BufferPage readBufferPage, BufferPagePool writeBufferPool, int threadNum) throws IOException - Throws:
IOException
-
-
Method Details
-
addRegister
-
run
-
doSelector
- Throws:
IOException
-
doRead
- Throws:
IOException
-
shutdown
public void shutdown()停止服务
-