by 8484hui » 19 Mar 2015, 02:36
Hi anders,
Thanks! When i implement the codes from the tutorial for getting the the plain data, i could not figure out where isRunning and json comes from, my visual studio kept prompt me with error of this 2 word is not in the current context. Coding shown below
public event EventHandler<ReceivedDataEventArgs> OnData;
private void ListenerLoop()
{
StreamReader reader = new StreamReader(socket.GetStream());
isRunning = true;
while (isRunning)
{
string response = string.Empty;
try
{
response = reader.ReadLine();
JObject jObject = JObject.Parse(response);
Packet p = new Packet();
p.RawData = json;
p.Category = (string)jObject["category"];
p.Request = (string)jObject["request"];
p.StatusCode = (string)jObject["statuscode"];