Snakehit
public text v1 · immutableSEND MSG
public void Send(string param) {
using(NetworkStream ns = new NetworkStream(sockect)) {
using (StreamWriter sw = new StreamWriter(ns)) {
sw.WriteLine(param);
}
}
}
READ MSG
public string Read() {
using(NetworkStream ns = new NetworkStream(socket)) {
using(StreamReader sr = new StreamReader(ns)) {
string line = "";
while ((line = sr.ReadLine()) != null) {
return line;
}
}
}
}