danielp | b913fa7 | 2013-03-03 06:23:20 +0000 | [diff] [blame] | 1 | /** |
| 2 | * |
| 3 | */ |
| 4 | package org.spartanrobotics; |
| 5 | |
| 6 | import java.nio.ByteBuffer; |
| 7 | import java.nio.channels.SocketChannel; |
| 8 | |
| 9 | /** |
| 10 | * @author daniel |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | /** Helper class to store data for AccepterThread. */ |
| 15 | public class Client { |
| 16 | public SocketChannel channel; //the client's socket |
| 17 | /* Holds overflow data when socket's send buffer gets full, so that |
| 18 | * thread can continue running. |
| 19 | */ |
| 20 | public ByteBuffer toSend; |
| 21 | /* Keeps track of how many times a non-blocking write operation on a socket |
| 22 | * has not written anything because it's buffer was full. |
| 23 | */ |
| 24 | public int failedAttempts; |
| 25 | } |