Source code: com/act365/net/tcp/TCP.java
1 /*
2 * JSocket Wrench
3 *
4 * Copyright (C) act365.com October 2003
5 *
6 * Web site: http://www.act365.com/wrench
7 * E-mail: developers@act365.com
8 *
9 * The JSocket Wrench library adds support for low-level Internet protocols
10 * to the Java programming language.
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the Free
14 * Software Foundation; either version 2 of the License, or (at your option)
15 * any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
20 * Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License along with
23 * this program; if not, write to the Free Software Foundation, Inc.,
24 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 */
26
27 package com.act365.net.tcp ;
28
29 /**
30 * Class <code>TCP</code> defines constants associated with the TCP protocol.
31 */
32
33 public class TCP {
34
35 // TCP flags
36
37 public final static byte FIN = 0x01 ,
38 SYN = 0x02 ,
39 RST = 0x04 ,
40 PSH = 0x08 ,
41 ACK = 0x10 ,
42 URG = 0x20 ;
43
44 // TCP states
45
46 public final static int CLOSED = 1 ,
47 LISTEN = 2 ,
48 SYN_RCVD = 3 ,
49 SYN_SENT = 4 ,
50 ESTABLISHED = 5 ,
51 CLOSE_WAIT = 6 ,
52 FIN_WAIT_1 = 7 ,
53 CLOSING = 8 ,
54 LAST_ACK = 9 ,
55 FIN_WAIT_2 = 10 ,
56 TIME_WAIT = 11 ;
57
58 }
59