us.ihmc.utilities.remote
Class TCPNetworkNode
java.lang.Object
us.ihmc.utilities.remote.TCPNetworkNode
public class TCPNetworkNode
- extends java.lang.Object
Title: TCPNetworkNode
Description: Represents either a simple client or server, provides utilities for connecting over tcp to other nodes (or anything else that uses tcp),
and creates streams for communicating between nodes.
Copyright: Copyright (c) 2007
Company: IHMC
- Version:
- 1.0
- Author:
- jrebula
Constructor Summary |
TCPNetworkNode(java.net.ServerSocket serverSocket,
java.net.Socket socket)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TCPNetworkNode
public TCPNetworkNode(java.net.ServerSocket serverSocket,
java.net.Socket socket)
startServer
public static TCPNetworkNode startServer(int port)
throws java.io.IOException
- Throws:
java.io.IOException
isConnected
public boolean isConnected()
createClientConnectedToServerAt
public static TCPNetworkNode createClientConnectedToServerAt(java.lang.String ip,
int port)
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
getDataInputStream
public java.io.DataInputStream getDataInputStream()
throws java.io.IOException
- Throws:
java.io.IOException
getDataOutputStream
public java.io.DataOutputStream getDataOutputStream()
throws java.io.IOException
- Throws:
java.io.IOException