J-Sim v1.2.1-p7 API

drcl.inet.socket
Class JavaSimSocketImpl

java.lang.Object
  extended byjava.net.SocketImpl
      extended bydrcl.inet.socket.JavaSimSocketImpl
All Implemented Interfaces:
java.net.SocketOptions, SocketStates

public class JavaSimSocketImpl
extends java.net.SocketImpl
implements SocketStates

In the framework of running real applications on JavaSim, this class provides a special socket implementation to intercept all the standard Java socket API calls. Refer to java.net.SocketImpl for details. This class has nothing to do with InetSocket.


Field Summary
 Port controlPort
           
 Port dataPort
           
 
Fields inherited from class java.net.SocketImpl
address, fd, port
 
Fields inherited from interface drcl.inet.socket.SocketStates
ACCEPTING, CLOSED, CLOSING, CONNECTED, CONNECTING, INIT, NO_OP, STATES
 
Fields inherited from interface java.net.SocketOptions
IP_MULTICAST_IF, IP_MULTICAST_IF2, IP_MULTICAST_LOOP, IP_TOS, SO_BINDADDR, SO_BROADCAST, SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY
 
Constructor Summary
JavaSimSocketImpl(Launcher l_, java.net.InetAddress default_, Port dataPort_, Port controlPort_, Node node_)
           
 
Method Summary
protected  void accept(java.net.SocketImpl s)
           
protected  int available()
           
protected  void bind(java.net.InetAddress host_, int port_)
           
protected  void close()
           
protected  void connect(java.net.InetAddress address_, int port_)
           
protected  void connect(java.net.SocketAddress address_, int timeout_)
          timeout_ is ignored.
protected  void connect(java.lang.String host_, int port_)
           
protected  void create(boolean stream)
           
protected  java.io.FileDescriptor getFileDescriptor()
           
protected  java.net.InetAddress getInetAddress()
           
protected  java.io.InputStream getInputStream()
           
protected  int getLocalPort()
           
 java.lang.Object getOption(int optID)
           
protected  java.io.OutputStream getOutputStream()
           
protected  int getPort()
           
protected  void listen(int backlog)
           
protected  void sendUrgentData(int data)
           
 void setOption(int optID, java.lang.Object value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.net.SocketImpl
shutdownInput, shutdownOutput, supportsUrgentData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dataPort

public Port dataPort

controlPort

public Port controlPort
Constructor Detail

JavaSimSocketImpl

public JavaSimSocketImpl(Launcher l_,
                         java.net.InetAddress default_,
                         Port dataPort_,
                         Port controlPort_,
                         Node node_)
Method Detail

getFileDescriptor

protected java.io.FileDescriptor getFileDescriptor()

getInetAddress

protected java.net.InetAddress getInetAddress()

getPort

protected int getPort()

getLocalPort

protected int getLocalPort()

accept

protected void accept(java.net.SocketImpl s)
               throws java.io.IOException
Throws:
java.io.IOException

available

protected int available()

bind

protected void bind(java.net.InetAddress host_,
                    int port_)

close

protected void close()
              throws java.io.IOException
Throws:
java.io.IOException

connect

protected void connect(java.net.InetAddress address_,
                       int port_)
                throws java.io.IOException
Throws:
java.io.IOException

connect

protected void connect(java.net.SocketAddress address_,
                       int timeout_)
                throws java.io.IOException
timeout_ is ignored.

Throws:
java.io.IOException

connect

protected void connect(java.lang.String host_,
                       int port_)
                throws java.io.IOException
Throws:
java.io.IOException

create

protected void create(boolean stream)

getInputStream

protected java.io.InputStream getInputStream()

getOutputStream

protected java.io.OutputStream getOutputStream()

listen

protected void listen(int backlog)
               throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()

getOption

public java.lang.Object getOption(int optID)
Specified by:
getOption in interface java.net.SocketOptions

setOption

public void setOption(int optID,
                      java.lang.Object value)
Specified by:
setOption in interface java.net.SocketOptions

sendUrgentData

protected void sendUrgentData(int data)
                       throws java.io.IOException
Throws:
java.io.IOException

J-Sim v1.2.1-p7 API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~