Menu

[r2]: / EventReader.java  Maximize  Restore  History

Download this file

38 lines (31 with data), 836 Bytes

 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
26
27
28
29
30
31
32
33
34
35
36
37
/**
* <strong>socket连接获取, 消息处理线程</strong>
* <p>
*
* </p>
*
* @author: 汉娱网络.技术部.yangxf
* @date: 2007-12-26
* @version: 1.1
**/
package com.handjoys;
import com.handjoys.logger.FileLogger;
public class EventReader extends Thread {
private GameServer gs;
private Thread thread;
public EventReader(GameServer gs) {
this.gs = gs;
thread = new Thread(this, "eventreader");
FileLogger.info("EventReader threads init, Create thread: " + thread);
thread.start();
}
public void run() {
while(!gs.IS_SHUTTING_DOWN) {
gs.readIncomingMessages();
try {
Thread.sleep(2L);
}catch(InterruptedException interruptedexception) {
}
}
}
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.