netP5
Class NetMessage

java.lang.Object
  extended by netP5.NetMessage

public class NetMessage
extends Object

Author:
andreas schlegel

Method Summary
 String address()
           
 byte[] getData()
          get the data of the message as bytes.
 DatagramPacket getDatagramPacket()
           
 String getString()
          get the data the message as string.
 TcpPacket getTcpPacket()
           
 InetAddress inetAddress()
           
 int port()
          get the port the net message was received at.
 int protocol()
          get the protocol type the message was sent over.
 TcpClient tcpConnection()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTcpPacket

public TcpPacket getTcpPacket()

getDatagramPacket

public DatagramPacket getDatagramPacket()

getData

public byte[] getData()
get the data of the message as bytes.

Returns:

getString

public String getString()
get the data the message as string.

Returns:

protocol

public int protocol()
get the protocol type the message was sent over. NetP5.TCP or NetP5.UDP are possible.

Returns:

port

public int port()
get the port the net message was received at.

Returns:

tcpConnection

public TcpClient tcpConnection()

address

public String address()

inetAddress

public InetAddress inetAddress()


processing library oscP5 by Andreas Schlegel. (c) 2004-2012