verinec.netsim.util.net.sockets.fsm
Class SocketImplClosed
java.lang.Object
java.net.SocketImpl
verinec.netsim.util.net.sockets.fsm.FSMSocketImpl
verinec.netsim.util.net.sockets.fsm.SocketImplClosed
- All Implemented Interfaces:
- SocketOptions
public class SocketImplClosed
- extends FSMSocketImpl
A SocketImpl in closed state
- Version:
- $Revision: 662 $
- Author:
- Dominik Jungo
| 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 |
| Methods inherited from class verinec.netsim.util.net.sockets.fsm.FSMSocketImpl |
create, faccept, favailable, fbind, fclose, fconnect, fconnect, fconnect, fcreate, fgetInputStream, fgetOutputStream, fsendUrgentData, getOption, listen, setOption |
SocketImpls
private Vector SocketImpls
backlog
private int backlog
SocketImplClosed
public SocketImplClosed(SocketImpl parent)
- Creates a new SocketImpl in closed state.
- Parameters:
parent - the SocketImpl used by the Socket
available
protected int available()
throws IOException
- Specified by:
available in class SocketImpl
- Throws:
IOException- See Also:
SocketImpl.available()
close
protected void close()
throws IOException
- Specified by:
close in class SocketImpl
- Throws:
IOException- See Also:
SocketImpl.close()
sendUrgentData
protected void sendUrgentData(int data)
throws IOException
- Specified by:
sendUrgentData in class SocketImpl
- Throws:
IOException- See Also:
SocketImpl.sendUrgentData(int)
getInputStream
protected InputStream getInputStream()
throws IOException
- Specified by:
getInputStream in class SocketImpl
- Throws:
IOException- See Also:
SocketImpl.getInputStream()
getOutputStream
protected OutputStream getOutputStream()
throws IOException
- Specified by:
getOutputStream in class SocketImpl
- Throws:
IOException- See Also:
SocketImpl.getOutputStream()
connect
protected void connect(String host,
int port)
throws IOException
- Specified by:
connect in class SocketImpl
- Throws:
IOException- See Also:
SocketImpl.connect(java.lang.String, int)
bind
protected void bind(InetAddress host,
int port)
throws IOException
- Specified by:
bind in class SocketImpl
- Throws:
IOException- See Also:
SocketImpl.bind(java.net.InetAddress, int)
connect
protected void connect(InetAddress address,
int port)
throws IOException
- Specified by:
connect in class SocketImpl
- Throws:
IOException- See Also:
SocketImpl.connect(java.net.InetAddress, int)
connect
protected void connect(SocketAddress address,
int timeout)
throws IOException
- Specified by:
connect in class SocketImpl
- Throws:
IOException- See Also:
SocketImpl.connect(java.net.SocketAddress, int)
accept
protected void accept(SocketImpl s)
throws IOException
- Specified by:
accept in class SocketImpl
- Throws:
IOException- See Also:
SocketImpl.accept(java.net.SocketImpl)
proccessUp
public void proccessUp(Packet packet)
- Description copied from class:
FSMSocketImpl
- Proccesses an incoming packet
- Specified by:
proccessUp in class FSMSocketImpl
- Parameters:
packet - a packet to be proccessed- See Also:
FSMSocketImpl.proccessUp(verinec.netsim.entities.packets.Packet)
setBacklog
public void setBacklog(int backlog)
- Sets the number of accpeting connections
- Overrides:
setBacklog in class FSMSocketImpl
- Parameters:
backlog - the number of accpeting connections
getSocketImpl
public SocketImpl getSocketImpl(int localport,
IAddress remoteaddress,
int remoteport)
- gets a bound socket from this host, null if there isn't a bound socket with specified parameters
- Parameters:
localport - localport of the bound socketremoteaddress - remote adddress of the bound socketremoteport - remote port of the bound socket
- Returns:
- the bound socket