usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Net.Sockets;namespaceConsoleApplication1{classProgram{staticvoidMain(string[]args){byte[]buffer=newbyte[1024];TcpClientchamber=newTcpClient("10.30.200.252",10001);NetworkStreamchamberStream=chamber.GetStream();byte[]msg=Encoding.ASCII.GetBytes("1,ROM?\r\n");chamberStream.Write(msg,0,msg.Length);charnewByte=' ';stringresp="";while(newByte!='\n'){newByte=Convert.ToChar(chamberStream.ReadByte());resp+=newByte;}Console.WriteLine(resp);chamber.Close();Console.Write("Press enter to quit");Console.ReadLine();}}}
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.