Hello all I'm very new to spread actually came across it today and wanted to get a feel for it. <br>I'm using the java API and having a bit of trouble connecting to my spread daemon and sending basic multicast messages.<br>
>From my understanding the messages should be sent to stdout this does not happen and i'm not seeing any received packets from spmonitor <br><br>Here is my simple test code. <br><br>[rbrown@macbookpro:/opt/spread/etc] $ egrep '^[^#]' spread.conf <br>
Spread_Segment <a href="http://127.0.0.255:4803">127.0.0.255:4803</a> {<br> localhost <a href="http://127.0.0.1">127.0.0.1</a><br>}<br><br>My java code. <br>public class SpreadExample {<br> public static void main(String[] args) throws IOException, SpreadException {<br>
SpreadVersion ver = new SpreadVersion();<br> SpreadMessage msg = new SpreadMessage();<br> SpreadGroup group = new SpreadGroup();<br> byte[] data = new byte[] {'h','e','l','l','o'};<br>
<br> SpreadConnection connection = new SpreadConnection();<br> InetAddress spreadhost = InetAddress.getByName("localhost");<br> connection.connect(spreadhost,4803,"group",false,false);<br>
group.join(connection,"Agroup");<br> msg.setData(data);<br> msg.addGroup("Agroup");<br> connection.multicast(msg);<br> }<br>}<br><br>Thanks. <br clear="all"><br>-- <br>Rodrick R. Brown<br>
<a href="http://www.rodrickbrown.com">http://www.rodrickbrown.com</a>