Subj : Socket Test
To   : Deuce
From : MCMLXXIX
Date : Tue Apr 29 2008 06:47 pm

Ok, so I messed with the code you sent me a little, and tried it using
both "127.0.0.1" with port 5000 + bbs.node_num
and  "127.0.0." + bbs.node_num with port 5000

both had the same result, listen error: 45
but there didn't seem to be a problem binding them either way

here's the code.. it's spammy
I didn't really expect it to work, since I'm half guessing, but I thought I
was on the right track.. maybe not.

load("sockdefs.js");
load("sbbsdefs.js");
load("nodedefs.js");

var stream=new Socket(SOCK_DGRAM, "InterNode");
main();

function main()
{
       if(!stream.bind(9000+bbs.node_num, "127.0.0.1")) {
           writeln("Bind failed: "+stream.error);
           exit(1);
       }
       else
       {
               if(ConnectionListener()) Chat();
               else exit(1);
       }
}
function Chat()
{
       //Receive();
       writeln("Test connection successful");
       exit(0);
}
function ConnectionListener()
{
       write("Waiting for users to connect");
       for(i=0;i<10;i++)
       {
               for(node in system.node_list) {
                       stream.sendto("ping","127.0.0.1",9000 + node);
               }
               if(stream.listen()) return true;
               if(console.inkey().toUpperCase()=="Q") exit(1);
               mswait(250);
               write(".");
       }
       writeln("\r\nListen failed: "+stream.error);
       exit(1);
}

---
� Synchronet � The BRoKEN BuBBLE (MDJ.ATH.CX)