Storing a simple port number is not sufficient. The WSYD_SocketAddress
can be passed directly between hosts and into constructors, and for services
and sockets.
*/
package uk.ac.ntu.n0521366.wsyd.libs.message;
+import uk.ac.ntu.n0521366.wsyd.libs.net.WSYD_SocketAddress;
+
/**
*
* @author TJ <hacker@iam.tj>
*
* The IP address should be set by the receiving service in the sourceAddress property.
*/
- int port;
+ public WSYD_SocketAddress socketAddress;
/**
* The message type
return _type;
}
- public MessagePresence(String service, int port) {
+ public MessagePresence(String service, WSYD_SocketAddress socketAddress) {
super();
this.serviceName = service;
- this.port = port;
+ this.socketAddress = socketAddress;
}
}