, 这是我的一个(1).txt文件的代码: 从客户端
string ip = "localhost";
int port = 8080;
string temperature = File.ReadAllText(@"C:\Users\Public\Documents\Hardware Config.txt");
TcpClient client = new TcpClient(ip, port);
int byteCount2 = Encoding.ASCII.GetByteCount(temperature);
byte[] sendData2 = new byte[byteCount2];
sendData2 = Encoding.ASCII.GetBytes(temperature);
NetworkStream stream = client.GetStream();
stream.Write(sendData2, 0, sendData2.Length);
stream.Close();
client.Close();
但是我想发送两个.txt文件,
string temperature = File.ReadAllText(@"C:\Users\Public\Documents\Hardware Config.txt");
和
string app = File.ReadAllText(@"C:\Users\Public\Documents\Application.txt");