Source code: com/act365/net/TCPJDatagramSocketImpl.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 import java.net.*;
30
31 import com.act365.net.SocketConstants ;
32
33 /**
34 * A socket class for the transmission of TCP packets.
35 * Transmission will use the IP protocol value reserved for TCP/J.
36 * @see SocketConstants
37 * The operating system will write the necessary IP headers.
38 */
39
40 public class TCPJDatagramSocketImpl extends GeneralDatagramSocketImpl {
41
42 /**
43 Creates a new unconnected raw socket that uses the TCP/J protocol.
44 */
45
46 public void create () throws SocketException {
47 create( SocketConstants.SOCK_RAW , SocketConstants.IPPROTO_TCPJ , false );
48 }
49 };
50
51