Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/act365/net/SocketConstants.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;
28  
29  /**
30   Defines platform-independent constants. Platform-dependent constants
31   are defined within native code.
32  */
33  
34  public interface SocketConstants {
35  
36    // Address family
37  
38    public final static int AF_INET  = 2 ;
39  
40    // Socket type
41  
42    public final static int SOCK_STREAM = 1 ,
43                            SOCK_DGRAM  = 2 ,
44                            SOCK_RAW    = 3 ;
45  
46    // Protocol
47  
48    public final static int IPPROTO_IP   = 0 ,
49                            IPPROTO_ICMP = 1 ,
50                            IPPROTO_TCP  = 6 ,
51                            IPPROTO_UDP  = 17 ,
52                            IPPROTO_TCPJ = 152 ,
53                            IPPROTO_RAW  = 255 ;
54  
55    // Send/receive flags
56  
57    public final static int MSG_OOB       = 1 ,
58                            MSG_PEEK      = 2 ,
59                            MSG_DONTROUTE = 4 ;
60  };
61