public static int Main(string[] args) { Fscc.Port p = new Fscc.Port(0); // Send "Hello world!" text p.Write("Hello world!"); // Read the data back in (with our loopback connector) Console.WriteLine(p.Read(100)); return(0); }
static private ExitCode loop(Fscc.Port p1, Fscc.Port p2) { string odata = "Hello world!"; string idata; p1.Write(odata); idata = p2.Read((uint)odata.Length); if (idata.Length == 0 || odata != idata) { return(ExitCode.InvalidData); } return(ExitCode.Success); }