Mercurial > hg > FederatedLinda
comparison src/fdl/CommDebugHook.java @ 34:e7c5958fd285
*** empty log message ***
author | kono |
---|---|
date | Sun, 24 Aug 2008 17:36:14 +0900 (2008-08-24) |
parents | 56e015e8f5dc |
children | fe338d497c72 |
comparison
equal
deleted
inserted
replaced
33:64071f8e2e0d | 34:e7c5958fd285 |
---|---|
12 if (key!=null) logs.add(closeLog(key)); | 12 if (key!=null) logs.add(closeLog(key)); |
13 } | 13 } |
14 | 14 |
15 | 15 |
16 public void checkHook(SelectionKey key, int id, int seq, char mode) { | 16 public void checkHook(SelectionKey key, int id, int seq, char mode) { |
17 if (key!=null) logs.add(log(key, id, seq, mode, null)); | 17 if (key==null || id<PSX.PRIVILEGED_ID_START) return; |
18 logs.add(log(key, id, seq, mode, null)); | |
18 } | 19 } |
19 | 20 |
20 | 21 |
21 public void inHook(SelectionKey key, int id, int seq, char mode) { | 22 public void inHook(SelectionKey key, int id, int seq, char mode) { |
22 if (key!=null) logs.add(log(key, id, seq, mode, null)); | 23 if (key==null || id<PSX.PRIVILEGED_ID_START) return; |
24 logs.add(log(key, id, seq, mode, null)); | |
23 } | 25 } |
24 | 26 |
25 | 27 |
26 public void outHook(SelectionKey key, int id, int seq, char mode, ByteBuffer data) { | 28 public void outHook(SelectionKey key, int id, int seq, char mode, ByteBuffer data) { |
27 if (key==null) return; | 29 if (key==null || id<PSX.PRIVILEGED_ID_START) return; |
28 String sendtext = PSX.getdataString(data); | 30 String sendtext = PSX.getdataString(data); |
29 logs.add(log(key, id, seq, mode, sendtext)); | 31 logs.add(log(key, id, seq, mode, sendtext)); |
30 } | 32 } |
31 | 33 |
32 | 34 |
33 public void waitReadHook(SelectionKey key, int id, int seq, char mode) { | 35 public void waitReadHook(SelectionKey key, int id, int seq, char mode) { |
34 if (key!=null) logs.add(log(key, id, seq, mode, null)); | 36 if (key==null || id<PSX.PRIVILEGED_ID_START) return; |
37 logs.add(log(key, id, seq, mode, null)); | |
35 } | 38 } |
36 | 39 |
37 public String log(SelectionKey key,int id, int seq,char mode, String sendtext) { | 40 public String log(SelectionKey key,int id, int seq,char mode, String sendtext) { |
38 //通信ログ Hostname:port 'mode' =number 形式でインクリメント | 41 //通信ログ Hostname:port 'mode' =number 形式でインクリメント |
39 int cnt = 0; | 42 int cnt = 0; |