[SIZE=2][COLOR=#2b91af]IS_ISI[/COLOR][/SIZE][SIZE=2] objConnect = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]IS_ISI[/COLOR][/SIZE][SIZE=2](0, [/SIZE][SIZE=2][COLOR=#0000ff]this[/COLOR][/SIZE][SIZE=2].strLFSPass, [/SIZE][SIZE=2][COLOR=#0000ff]this[/COLOR][/SIZE][SIZE=2].strAppName);
[/SIZE][SIZE=2][COLOR=#2b91af]Byte[/COLOR][/SIZE][SIZE=2][] data = PacketToData( objConnect );[/SIZE]
[SIZE=2]
[SIZE=2][COLOR=#2b91af]TcpClient[/COLOR][/SIZE][SIZE=2] objTCPC = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]TcpClient[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]this[/COLOR][/SIZE][SIZE=2].strRemoteHost, [/SIZE][SIZE=2][COLOR=#0000ff]this[/COLOR][/SIZE][SIZE=2].intRemortPort);[/SIZE]
[SIZE=2][COLOR=#2b91af]NetworkStream[/COLOR][/SIZE][SIZE=2] objNS = objTCPC.GetStream();[/SIZE]
[SIZE=2][COLOR=#2b91af]Console[/COLOR][/SIZE][SIZE=2].WriteLine([/SIZE][SIZE=2][COLOR=#a31515]"TCP Connected {0}:{1}"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]this[/COLOR][/SIZE][SIZE=2].strRemoteHost, [/SIZE][SIZE=2][COLOR=#0000ff]this[/COLOR][/SIZE][SIZE=2].intRemortPort);[/SIZE]
[SIZE=2][COLOR=#008000]//Send Connection Packet[/COLOR][/SIZE]
[SIZE=2][COLOR=#2b91af]IS_ISI[/COLOR][/SIZE][SIZE=2] connect = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]IS_ISI[/COLOR][/SIZE][SIZE=2](0, [/SIZE][SIZE=2][COLOR=#a31515]"pass"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#a31515]"appname"[/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2][SIZE=2][COLOR=#008000]//InSim Init - Packet to initialise the InSim System [/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]struct[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]IS_ISI[/COLOR][/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]byte[/COLOR][/SIZE][SIZE=2] Size = 44;[/SIZE]
[SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]byte[/COLOR][/SIZE][SIZE=2] Type = 1; [/SIZE][SIZE=2][COLOR=#008000]//ISP_ISI[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]byte[/COLOR][/SIZE][SIZE=2] ReqI = 1; [/SIZE][SIZE=2][COLOR=#008000]//Requests IS_VER packet[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]UInt16[/COLOR][/SIZE][SIZE=2] UDPPort = 0; [/SIZE][SIZE=2][COLOR=#008000]//Port for UDP Replies 0 - 65535[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]UInt16[/COLOR][/SIZE][SIZE=2] Flags = 32; [/SIZE][SIZE=2][COLOR=#008000]//Bit flags for options[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]byte[/COLOR][/SIZE][SIZE=2] Sp0 = 0;[/SIZE]
[SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]byte[/COLOR][/SIZE][SIZE=2] Prefix = System.Text.[/SIZE][SIZE=2][COLOR=#2b91af]Encoding[/COLOR][/SIZE][SIZE=2].ASCII.GetBytes([/SIZE][SIZE=2][COLOR=#a31515]"$"[/COLOR][/SIZE][SIZE=2])[0];[/SIZE]
[SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]UInt16[/COLOR][/SIZE][SIZE=2] Interval;[/SIZE]
[SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]char[/COLOR][/SIZE][SIZE=2][] Admin;[/SIZE]
[SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]char[/COLOR][/SIZE][SIZE=2][] IName;[/SIZE]
[SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][SIZE=2] IS_ISI([/SIZE][SIZE=2][COLOR=#2b91af]UInt16[/COLOR][/SIZE][SIZE=2] Interval, [/SIZE][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][SIZE=2] Admin, [/SIZE][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][SIZE=2] IName)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff]this[/COLOR][/SIZE][SIZE=2].Interval = Interval;[/SIZE]
[SIZE=2][COLOR=#0000ff]this[/COLOR][/SIZE][SIZE=2].Admin = Admin.ToCharArray();[/SIZE]
[SIZE=2][COLOR=#0000ff]this[/COLOR][/SIZE][SIZE=2].IName = IName.ToCharArray();[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE]
[/SIZE]