It is used to connect you, assuming your node was accepting incoming connections. If so, you should indicate in the service bits.
Writer writer;
.....
a.address = InetAddress.getLocalHost ();
a.port = myport;
writer.writeAddress (a, getVersion (), true);
class Writer {
.....
public void writeAddress (Address address, long version, boolean versionMessage)
{
if ( !versionMessage && version > 31402 )
{
writeUint32 (address.time);
}
writeUint64 (address.services);
byte[] a = address.address.getAddress ();
if ( a.length == 4 )
{
byte[] prefix = new byte[10];
writeBytes (prefix);
writeUint16 (0xffffl);
}
writeBytes (a);
bs.write ((int) (0xFF & (address.port >> 8)));
bs.write ((int) (0xFF & address.port));
}