//public MyDataSource DataSource; // sending field as cookie - cuts of at ; inside xml escapes.. // http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/net/MulticastSocket.java#MulticastSocket.joinGroup%28java.net.SocketAddress%2Cjava.net.NetworkInterface%29 // http://grepcode.com/file/repository.springsource.com/org.apache.xalan/com.springsource.org.apache.xml.serializer/2.7.1/org/apache/xml/serializer/ToStream.java public Task<MyDataSource> DataSource_poll(MyDataSource DataSource) { // first timer null if (DataSource == null) DataSource = new MyDataSource(); DataSource.poll(); // Set-Cookie:InternalFields=field_DataSource=<_02000006>%0d%0a <_0400000b>1</_0400000b>%0d%0a <_0400000c><DataTable TableName="">%0d%0a <Columns>%0d%0a <DataColumn ReadOnly="true">xml</DataColumn>%0d%0a </Columns>%0d%0a <DataRow>%0d%0a <DataColumn>&lt;fake&gt;data { last_id = 0, Count = 0 }&lt;/fake&gt;</DataColumn>%0d%0a </DataRow>%0d%0a</DataTable></_0400000c>%0d%0a <_0400000d>1000</_0400000d>%0d%0a <_0400000e>10</_0400000e>%0d%0a <_0400000f>30</_0400000f>%0d%0a</_02000006>; // Cookie GetValues { value = field_DataSource=<_02000006>%0d%0a <_0400000b>1</_0400000b>%0d%0a <_0400000c>< } return DataSource.ToTaskResult(); }
private async void ApplicationControl_Load(object sender, System.EventArgs e) { var DataSource = new MyDataSource(); while (true) { await Task.Delay(500); // leech only if (this.checkBox1.Checked) { DataSource = await applicationWebService1.DataSource_poll(DataSource); button1.Text = new { DataSource.last_id }.ToString(); // Set-Cookie:InternalFields=field_DataSource=<_02000006>%0d%0a <_0400000a>1</_0400000a>%0d%0a <_0400000b><DataTable TableName="">%0d%0a <Columns>%0d%0a <DataColumn ReadOnly="true">xml</DataColumn>%0d%0a </Columns>%0d%0a <DataRow>%0d%0a <DataColumn>&lt;fake&gt;data { last_id = 0, Count = 0 }&lt;/fake&gt;</DataColumn>%0d%0a </DataRow>%0d%0a</DataTable></_0400000b>%0d%0a <_0400000c>1000</_0400000c>%0d%0a <_0400000d>10</_0400000d>%0d%0a <_0400000e>30</_0400000e>%0d%0a</_02000006>; if (DataSource.data != null) { Console.WriteLine("got DataSource.data"); var value = DataSource.data; this.History.Add(value); DataSource.data = null; SetBindingSource(); } } await Task.Delay(1500); } }