IIS6.0中接收客户端发送的POST数据问题 [问题点数:200分,结帖人miaolingshaohua]

Bbs5
本版专家分:4973
结帖率 100%
Bbs6
本版专家分:7697
Bbs6
本版专家分:6280
php接收客户端post数据问题
vc<em>客户端</em>向php server端<em>post</em> abc.txt文件,但在php server端的upfiles目录下未生成abc.txt文件,用Fiddler抓包,发现php server端返回http 200,<em>post</em>的abc.txt文件内容也有,为啥server收不到呢?请高手指点。非常感谢!rnabc.txt文件内容:rnverify:localrnid:1111rnhost:2.2.2.2rnid:2222rnhost:3.3.3.3rnid:3333rnhost:4.4.4.4rnrnFiddler抓包截图:rn[img=https://img-bbs.csdn.net/upload/201306/25/1372144588_720363.jpg][/img]rnrnrnphp server端代码:rn
post接收返回数据问题
[code=javascript]rn$.ajax(rn type:'<em>post</em>',rn datatype:'json',rn url:'https://xxx.com',rn data:"id":"1");rn success:function(response)rn ....rn ,rn error:function(response)rn ....rn ,rn complete:function(response)rn ....rn rn[/code]rn向第三方Api接口<em>post</em><em>数据</em>:rnerror和complete函数里面返回的是:rnstatus:0rnstatusText:NetworkErrorrn我用fiddler监测,第一个地址是http://xxx.com然后tunnel to https://xxx.com,返回的是正确的json。rn但是我在代码里面<em>接收</em>不到正确的结果,这个是跨域的<em>问题</em>还是什么?该怎么解决。谢谢。
POST数据无法接收问题
一个html页面中这样rn rnrnrnrnRePost.aspx文件中rnrnstring boby = Request.QueryString["boby"];rnrnResponse.Write(boby);rnrnrn没有任何返回。
php的post数据接收问题
当一个软件(非网页)<em>post</em><em>数据</em>到某个网页,需要php获得<em>post</em>来的所有<em>数据</em>并进行简单整理,如<em>post</em>一个test.rar 或test.doc。rnrn<em>post</em>过来的<em>数据</em>中包含,文件类型,文件要保存的名称,文件大小等等rnrn要求能够吧这些<em>数据</em>整理好,分别存到<em>数据</em>库中,并且文件在设定好的路径保存名称按照<em>post</em>中的名称保存。rnrn希望能有高手迅速解决,代码完整分数散尽!谢谢
php 接收发送POST/GET请求 接收Xml格式数据POST请求及发送
补充三点说明:1.Get请求<em>数据</em>根据索引关键字直接从全局变量$_GET中获取(无需再调用urldecode解码)    $_GET 数组 存储Get请求字符串(用&amp;amp;划分字符串为数组,数组元素的形式为:a=b)2.POST请求字符串形式的<em>数据</em>同样可以根据索引关键字从$_POST中获取    $_POST 数组 存储Post请求字符串(用&amp;amp;划分字符串为数组,数组元素的形式为:a=b)3...
发送post数据以后的问题
我成功的向目标url<em>发送</em>了<em>post</em><em>数据</em>,我怎么达到一下的页面的呢?rnrn比如我说,我登陆某邮箱以后,我再点击某个信件,就可以看到我的信件的内容。我在程序中,如何像浏览器一样请求下一个页面啊?rnrn
HttpClient发送POST请求,SpringMVC接收问题
<em>发送</em>代码:rn[code=java]rnpublic static void main(String[] args) throws Exception rn HttpClient client = new DefaultHttpClient();rn String path = "http://localhost:8080/TestAnnotationConfig/b";rn HttpPost <em>post</em> = new HttpPost(path);rn Vendor v = new Vendor();rn v.setName("传输<em>数据</em>");rn v.setDescription("<em>数据</em>传输");rn v.setCreateDate(new Date());rn v.setId(20);rn String content = JSONBinder.binder(Vendor.class).toJSON(v);rn StringEntity entity = new StringEntity(content);rn entity.setContentEncoding("UTF-8");rn entity.setContentType("application/json");rn <em>post</em>.setEntity(entity);rn HttpResponse response = client.execute(<em>post</em>);rn System.out.println("响应状态码:" + response.getStatusLine().getStatusCode());rn InputStream is = response.getEntity().getContent();rn String text = StreamUtil.readInputStream(is);rn System.out.println("服务器端响应的<em>数据</em>:" + text);rn rn[/code]rnrn服务器端<em>接收</em>的代码:rn[code=java]rn@RequestMapping(value = "/b", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)rn @ResponseBodyrn public String b(@RequestBody Vendor v) rn System.out.println("<em>客户端</em><em>发送</em>的<em>数据</em>:" + v);rn return "success";rn rn[/code]rnrn执行代码报错415。请问怎么回事?rnJackson的HttpMessageConverter我已经配置了,从服务器端返回<em>数据</em>测试已通过,现在就是朝服务器端<em>发送</em>json,报错415。rnrn大神求解,叩谢。
cgi 接收post数据
cgi <em>接收</em><em>post</em>的<em>数据</em>
接收post数据的形式
PHP的<em>post</em><em>数据</em>与request<em>数据</em>   $_POST变量(数组)   类似$_GET变量(数组),$_POST代表页面通过<em>post</em>方式提交过来的<em>数据</em>所形成的数组。   <em>post</em>提交<em>数据</em>,通常只有一种形式:   Project 1:   Project 2:   其作用是:用户填写表单<em>数据</em>,并提交后,会将<em>数据</em><em>发送</em>(提交)给页面abc.php,其实也可以理解为“打开”该网页(abc.
接收post过来的数据
asp<em>接收</em><em>post</em>过来的<em>数据</em>方法是:rnrnrndelphi如何实现这个功能呢,rn<em>接收</em><em>post</em>过来的name和password,并showmessage显示出来rn
axios发送post请求,springMVC接收不到数据问题
最近做项目的时候,前端异步请求用到了尤大推荐的axios,发现一个<em>问题</em>,就是POST请求的时候,后台人员说他们的接口里面取不到我传过去的<em>数据</em>。案例重现axios.jslet axios = import('axios'); instance = axios.create({ baseURL: '/ghcws', timeout: 10000, }); export default inst...
axios发送post请求,springMVC接收不到数据问题之解决
本文有axios的get方法、<em>post</em>方法。 axios<em>发送</em><em>post</em>请求,springMVC<em>接收</em>不到<em>数据</em><em>问题</em>之解决。关键是: let params = new URLSearchParams(); params.append('name', this.currentLoginUser.userName); params.append('pass', this.currentLoginU...
解决SpringMVC接收不到axios发送post请求的数据问题
最近在做一个项目,项目的后端是地址: https://github.com/wangyuanjun008/wyj-springboot-security.git 前端地址是 https://github.com/wangyuanjun008/wyj-vue-security.git ,使用的前端语言是vue,使用webpack构建vue-cli全家桶 在项目中需要用到axios与后端接口交互的
关于数据发送接收问题
我们在做一个系统,比如做了一份报询价,需要<em>发送</em>给对方客户(对方客户也用我们这个系统),对方客户<em>接收</em>这个报询价。这一个过程怎么实现(我们有一个固定IP地址的服务器),不知各位大虾是用什么实现的,希望给点意见,谢谢!
UDP数据接收发送问题
我用一个程序实现四条线程向服务器某个端口不断的<em>发送</em>UDP<em>数据</em>包,代码如下:[code=javascript]UdpClient udpClient = new UdpClient(s.sendPort);rnudpClient.Connect(IPAddress.Parse(s.ip), s.port);rnbyte[] sendBytes = Encoding.ASCII.GetBytes(s.message);rnDateTime dtEnd = DateTime.Now.AddSeconds(s.time);rnint count = 0;rnwhile (DateTime.Now.CompareTo(dtEnd) == -1)rnrn Thread.Sleep(1);rn udpClient.Send(sendBytes, sendBytes.Length);rnrnudpClient.Close();rn[/code]rnrn服务器端进行对端口的侦听,代码如下rn[code=csharp]rnUdpClient listener = new UdpClient((int)port);rnIPEndPoint iep = null;rnwhile (true)rnrn byte[] bytes = listener.Receive(ref iep);rn string strResult = Encoding.Default.GetString(bytes);rn InsertXml(strResult );rnrn[/code]rnrn测试结果发现,<em>发送</em>端在10秒内<em>发送</em>了大约2500条<em>数据</em>,而<em>接收</em>端只处理了1200条左右的<em>数据</em>,rn如果不执行InsertXml(strResult )函数,即<em>接收</em>端能<em>接收</em>到相同的<em>数据</em>,rn证明<em>接收</em>端并不是没有<em>接收</em>到<em>数据</em>,而是在进行InsertXml(strResult )<em>数据</em>处理时有一部分<em>数据</em>丢失了,为什么?如果用异步去处理这些<em>数据</em>,应该如何实现,rn尝试过直接创建新的线程去执行InsertXml(strResult ),但效果差不多,请问各位大虾,你们是如何去处理这些<em>问题</em>的
接收发送udp数据问题
我将收到的udp<em>数据</em>5min打一个包存入文件,现在想把文件中的udp<em>数据</em>播放出来(send),有其他程序<em>接收</em>,怎么实现?rn因为在<em>接收</em>时两个UDP包的时间间隔是500ms,<em>发送</em>的时候就应该thread.sleep(500);怎么才能根据udp包的时间间隔<em>发送</em>?
socket数据接收发送问题
我定义了一个byte[256]来存储要发达和<em>接收</em>的<em>数据</em>rn 但在我的程序中,如果前一次<em>发送</em>的字符串比如是"我的世界"这个字符串rn 再在下一次<em>发送</em>字符串"我的"时候还是显示"我的世界"rn 只有当<em>发送</em>像"极品五笔"这样可以完全覆盖前面的<em>数据</em>的时候,才可以正确显示.rn 谁能帮我解决这个<em>问题</em>.rn 以下是我的代码rn namespace ConsoleApplication2rnrn class Programrn rn static void Main(string[] args)rn rn tryrn rn Socket s = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);rn IPAddress serverIP = IPAddress.Parse("127.0.0.1");rn s.Connect(serverIP, 10000);rn byte[] sendBytes = new byte[256];rn if (s.Connected)rn rn string sendString = "";rn while (true)rn rn if (sendString.Equals("exit"))rn break;rn sendString = Console.ReadLine();rn sendBytes = Encoding.UTF8.GetBytes(sendString.ToCharArray()); rn tryrn rn s.Send(sendBytes, sendBytes.Length, 0);rn rn catch (SocketException e)rn rn Console.WriteLine(e.Message);rn rn rn s.Shutdown(SocketShutdown.Both);rn s.Close();rn rn elsern rn Console.WriteLine("can not conn");rn rn rn rn catch (Exception e)rn rn Console.WriteLine(e.Message);rn rn rn rnrnrnnamespace ConsoleApplication1rnrn public class Processorrn rn public Socket s;rn public Processor(Socket so)rn rn s = so; rn rn public void ThreadProcess()rn rn tryrn rn Console.WriteLine("a client has connected");rn byte[] recvBytes = new byte[256];rn int bytes = 0;rn while (true)rn rn if (s.Connected)rn rn tryrn rn bytes = s.Receive(recvBytes, recvBytes.Length, 0);rn rn catch (SocketException e)rn rn Console.WriteLine(e.Message);rn rn string recvString = Encoding.UTF8.GetString(recvBytes);rn Console.WriteLine(recvString);rn rn if (bytes == 0)rn break;rn rn s.Shutdown(SocketShutdown.Both);rn s.Close();rn rn catch (SocketException e)rn rn Console.WriteLine(e.Message);rn rn rn rnrn
数据发送接收的逻辑问题
<em>发送</em><em>数据</em>1然后<em>接收</em><em>数据</em>,无论是否<em>接收</em>到,都在1000ms后<em>发送</em><em>数据</em>2,一直到<em>数据</em>20,我该怎么用C#实现,强人帮我有分,最好示范下代码
Node.js中http 接收get请求、接收post请求、发送get请求、发送post请求
<em>接收</em>get请求/** *<em>接收</em>一个带参数的http请求 * 127.0.0.1:3000/http_get?name=小小沉沉&password=qwer * 一般会有两次请求 另一次为http://127.0.0.1:3000/favicon.ico 这个是浏览器自动发起的请求,需要特殊处理 * *///导入http模块var http=require('http'); var util = re
C# Post 数据接收和返回数据问题
各位高手,我想实现的功能是:rn1.用户Post一个<em>数据</em>包(XML格式)过来,我<em>接收</em>到该<em>数据</em>包经过一些处理后返回给请求用户。具体要怎么做啊,我弄了下可以<em>接收</em>到和返回<em>数据</em>。但是方法好像不是很好。求做过类似功能的大侠 帮助rnrnrn我的Post代码是:rn[code=C#]rnrn public static string Test(string <em>post</em>Url, string paramData)rn rn string ret = string.Empty;rn tryrn rn byte[] byteArray = Encoding.UTF8.GetBytes(paramData); rn HttpWebRequest webReq = (HttpWebRequest)WebRequest.Create(new Uri(<em>post</em>Url));rn webReq.Method = "POST";rn webReq.ContentType = "application/x-www-form-urlencoded";rnrn webReq.ContentLength = byteArray.Length;rn Stream newStream = webReq.GetRequestStream();rn newStream.Write(byteArray, 0, byteArray.Length);rn newStream.Close();rnrn HttpWebResponse response = (HttpWebResponse)webReq.GetResponse();rn StreamReader sr = new StreamReader(response.GetResponseStream(), Encoding.Default);rn ret = sr.ReadToEnd();rn sr.Close();rn response.Close();rn newStream.Close();rn rn catch (Exception err)rn rn throw new Exception(err.Message);rn rn return ret;rn rnrn<em>接收</em>代码是:rn Stream resStream = HttpContext.Current.Request.InputStream;rn StreamReader sr = new StreamReader(resStream, System.Text.Encoding.UTF8);rn string requestXml = sr.ReadToEnd();rnrnrn[/code]rnrnrnrn返回给请求用户的代码要怎么写。 谢谢
POST发送XML数据
package com.itheima.xml; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.MalformedURLException;
asp.net发送post数据
如下有一个接口rn http://api.vs128.com/ajax/api.ashxrn它只<em>接收</em><em>post</em><em>数据</em>的id,rnrn以下是 asp<em>发送</em>的<em>post</em><em>数据</em>rn[code=vb]rnset http = Server.CreateObject("MSXML2.XMLHTTP")rn '以异步方式<em>发送</em><em>数据</em>rn http.open "POST","http://api.vs128.com/ajax/api.ashx",falsern http.setRequestHeader "Content-Type","application/x-www-form-urlencoded"rn http.send("id=1")rn 'Result为api接口的响应信息rn 'responseBody: 结果返回为无符号整数数组。rn 'responseStream: 结果返回为IStream流。rn 'responseText : 结果返回为字符串。rn 'responseXML: 结果返回为XML格式<em>数据</em>。rnrn Result = http.ResponseTextrn set http = Nothingrn[/code]rnrn请问asp.net 如果<em>发送</em><em>post</em><em>数据</em>
客户端发送POST请求数据到服务器
/** * Created by yang on 2017/1/4. */ // 导入模块 var http = require('http'); var querystring = require('querystring'); var util = require('util');// 创建服务器 var server = http.createServer(function (req, r
LWIP 数据接收发送
在Znyq的SDK例程中,main中主循环<em>发送</em><em>接收</em>,其中<em>接收</em>为  xemacif_input(echo_netif): 查询xemacit_input 函数里 xemacif_input
数据接收发送
网络 通信 聊天 编程 <em>客户端</em> 服务器 代码的使用详尽
数据发送接收
已知如下数组:rnconst unsigned char gImage_kaka[100] = rn0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,rn0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,rn0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,rn0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,rn0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,rn0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,rn0x3c,0x3d,0x3e,0x3f,0x40,0x41,0x42,0x43,0x44,0x45,rn0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,rn0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,rn0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,0x60,0x61,0x62,0x63rn;rn怎么把这个数组以帧的方式发出去?rnstruct PACKETrnrn char cHead; // 自定义帧头标志,如0x02或者'A'(这个任意)rn int nLength; // 说明后点vbData的长度rn BYTE vbData[100]; // 实际上应该是变长的结构,rn;rn结构体怎么设置呢?rn<em>发送</em>出去怎么<em>发送</em>呢?rn<em>接收</em>怎么<em>接收</em>呢?
socket数据接收发送
Linux下<em>数据</em>的<em>接收</em>和<em>发送</em> Linux 不区分套接字文件和普通文件,使用 write() 可以向套接字中写入<em>数据</em>,使用 read() 可以从套接字中读取<em>数据</em>。 前面我们说过,两台计算机之间的通信相当于两个套接字之间的通信,在服务器端用 write() 向套接字写入<em>数据</em>,<em>客户端</em>就能收到,然后再使用 read() 从套接字中读取出来,就完成了一次通信。 write() 的原型为: s
数据接收发送(练习)
<em>发送</em>方:Demo002Send.javapackage com.shsxt.day09.udp;import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddr
数据接收、处理、发送
后台实质: 插入、删除、修改: <em>接收</em>页面<em>数据</em>-----加工<em>数据</em>(其他格式<em>数据</em>转换成java<em>数据</em>)-----封装到JavaBean类里(方便<em>数据</em>的传递)----SQL语句(将javaBean类中的<em>数据</em>赋给SQL)-------插入、删除、修改   查询: 1.条件查询: <em>接收</em>页面<em>数据</em>-----加工<em>数据</em>(其他格式<em>数据</em>转换成java<em>数据</em>)-----封装到JavaBean类里(方便<em>数据</em>的传...
serailport数据发送接收
小弟是个新手,请高手帮忙解答下我的疑惑:rnrn如果我使用com1口进行<em>数据</em>的<em>发送</em>,那在com1口中能取到<em>发送</em>的<em>数据</em>、还是com1口发<em>数据</em>com2口<em>接收</em><em>数据</em>?rnrn这个<em>问题</em>我一直没有搞明白。
串口数据发送 接收
用串口调试助手 每隔50ms<em>发送</em><em>数据</em> <em>发送</em>200多次的时候,大概会出现7、8次没有<em>数据</em>返回 这样正常吗
***************数据发送接收
用delphi怎么实现在<em>数据</em>库名相同,相同的表,相同的字段的情况下,怎么在不同计算机之间进行多个表的<em>数据</em><em>发送</em>和<em>接收</em>(因为是部分<em>数据</em>,不能使用备份和恢复)rn谢谢各位大哥!分不够再加
HTML客户端连接,发送接收问题
想在录音的同时把<em>数据</em>通过HTML协议<em>发送</em>到服务器端,并保存服务器端返回的<em>数据</em>?应该用哪些方法rn可能会有多次录音,应该怎么和服务器连接,请HTML高手给点建议.谢谢
客户端接收live555发送的aac的问题
服务器为live555,媒体<em>数据</em>为aac文件。rn在<em>客户端</em>可正常<em>接收</em>rtp包,使用vlc也可正常连接服务器并播放音频。rnrn<em>接收</em>的一个UDP包<em>数据</em>如下,从前12个字节分析可知RTP包头正确。请帮助分析:rn80 E0 91 E2 16 62 19 A0 5D 4E 8B 19 00 10 04 C0 21 19 95 1D 39 8D 02rnrn参考此链接中给出的方法:http://bbs.csdn.net/topics/220080266rn无法正常将<em>数据</em>组包为ADTS并存储。rn该链接中提出了如何获取当前有效音频<em>数据</em>的长度。但此次buffer[12]的值为0x00,难道表示此帧音频<em>数据</em>有效长度为0,然而,每帧<em>数据</em>该位置均是0x00,原因请高手解答。
windows 2003 iis6.0 post
windows 2003 <em>iis6.0</em>rnPOST /CallAuth/ HTTP/1.1 这样是可以的rnPOST /CallAuth HTTP/1.1 这样是不行的rnrn如何解决,请指教。
php中如何接收Ajax POST数据
[code=html] rn 正在加载联系人rn rnrnrnrn rnrnrn rn rnCtrl+Enterrn <em>发送</em>rnrnrnrn[/code]rnrn[code=javascript]rn/**rn * <em>发送</em>信息/获取信息rn */rn// 清除定时器rnfunction clearChatTimers(id)rn if(id)rn //请除指定用户定时执行rn if(aPChatTimers[id])rn clearTimeout(aPChatTimers[id]);rn loadFlag = false;rn// console.log('clear:'+aPChatTimers[id]);rn rn elsern //请除所有用户定时执行rn for (var i=0;i0)rn var _scrollHeight = $('.dialog-comment-list').find('li').last().offset().top;rn $("#<em>post</em>-reply").closest('.site-im-dialog').find('.dialog-comment-list').animate(zoom:1,function()rn $(".dialog-comment-list-box").data('jsp').scrollTo(0, _scrollHeight);rn );rn rnrn $("#<em>post</em>-reply").removeAttr('disabled');rn clearInputMessage();rn clearChatTimers(0);rn getPrivateMessages(uid);rn elsern tipsOp(json.msg,'error');rn $("#<em>post</em>-reply").removeAttr('disabled');rn rn rn ,'json');rnrn[/code]rnrnrn返回 "msg":"\u53d1\u9001\u6210\u529f","status":"1","data":[]rnrn单击<em>发送</em>或 Ctrl+Enter 按钮不抬起 (如图)rnrn[img=https://img-bbs.csdn.net/upload/201504/04/1428144795_311368.png][/img]rnrnrnrnrnrn如何才能单击<em>发送</em>按钮或者按CTRL+ENTER 把<em>数据</em>POST到php处理 求PHP代码rnrnrnrnrn
客户端与服务器端数据接收
服务器端:连续<em>发送</em> 3笔<em>数据</em>rn _clientSkt.Send(new byte[] 9, 2 );rn _clientSkt.Send(new byte[] 9, 1 );rn _clientSkt.Send(_msgBuff);rn<em>客户端</em>: rn byte[] buf = new byte[_maxPacket];rn int byteCnt = _nws.Read(buf, 0, buf.Length);rn byte[] buf 1= new byte[_maxPacket];rn int byteCnt 1= _nws.Read(buf1, 0, buf1.Length);rn byte[] _msgBuff = new byte[_maxPacket];rn _nws.Read(_msgBuff, 0, _msgBuff.Length);rnrn发现在<em>客户端</em>的_msgBuff 有时候能获取到<em>数据</em>,有时候却不能,求大神们指教
post提交的数据如何接收~?
[code=C#]HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); rn request.Method = "POST";//这无论是赋<em>post</em>还是get,都必须用全大写,此值错一点,都会导致程序错误,因为不符合http协议 rnrequest.ContentType = "multipart/form-data; boundary=--abc";//或者为"application/x-www-form-urlencoded",对应form标签里的 enctype属性,boundary那部分查是FORM元素各值的分隔符,具体请查阅HTTP协议相关文档,如果此值用application/x- www-form-urlencoded则form各元素用&来分隔,而元素的值是经过了url编码,调用System.Web.HttpUtility.UrlEncode方法,就能将值进行url编码。rn//如果需要加cookie,则按如下方式添加,具体请参阅msdn rnrequest.CookieContainer = new CookieContainer(); rnrnrequest.CookieContainer.Add(new Cookie("test", "i love u", "/", "localhost")); rnrnbyte[] data = Encoding.GetEncoding(encoding).GetBytes(<em>post</em>Data);//将要<em>发送</em>的<em>数据</em>按HTTP协议拼装好字符串转成字节数组 rnrequest.ContentLength = data.Length;//设置内容的长度,长度就是要<em>发送</em>的整个字节数组的长度,此句必须有,长度不对就会导致错误 rnrequest.GetRequestStream().Write(data, 0, data.Length);//获取request的流,将<em>数据</em>写入流中,至此完成了form提交的必须有的步骤 rnresponse = (HttpWebResponse)request.GetResponse();//最后取得response获取服务器端的返回<em>数据</em>进行处理[/code]rnrnrn从 A.aspx用此方法提交<em>数据</em>,如何在B.aspx页面<em>接收</em>到这些<em>数据</em>?rn用不用在A.aspx里面Response.Redirect("B.aspx");?
如何接收post过来的数据
<em>问题</em>:如何在save.aspx中<em>接收</em>到<em>客户端</em>vbscript中通过<em>post</em><em>发送</em>过来的xml文档rn<em>客户端</em>http中的角本如下:rn '前面已生成一个xmldoc字符串rn .....rn xmlDoc.appendChild xmlRoot '节点添加到xml文件 rn set HttpSend=CreateObject("Microsoft.XMLHTTP") '创建HTTP<em>发送</em>对象rn str="savexml.aspx?active=save" rn HttpSend.open "POST",str,false '//打开<em>发送</em>通道rn HttpSend.send xmlDoc '<em>发送</em><em>数据</em>rn rn strReturn=HttpSend.ResponseText '//<em>接收</em>返回结果rn msgbox strReturn '弹出提示rnrn'-----------------------<em>客户端</em>结束rnrn那么在savexml.aspx中,如何得到<em>客户端</em><em>post</em>过来的XML串.我要对<em>post</em>过来的xml文档进行分析.rnrn用VB.NET语言写!rnrn请各位大侠帮助.分不是<em>问题</em>,解决<em>问题</em>是关键.分不够,加分.rn
$.post回调函数接收不到数据
[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/2.gif][/img]是什么原因
curl post接收不到数据
aa.php用curl函数向test.php POST<em>数据</em>rnrnaa.php内容:rn"aaa","pas"=>"bbbb");rn$ch = curl_init();rncurl_setopt($ch, CURLOPT_URL, "http://localhost/test.php");rncurl_setopt($ch, CURLOPT_POST, true);rncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);rncurl_setopt($ch, CURLOPT_POSTFIELDS, $data);rncurl_setopt($ch, CURLOPT_TIMEOUT, 30);rn$result = curl_exec($ch);rncurl_close($ch);rnecho $result;rn?> rnrntest.php内容:rn
C++接收HTTP POST数据
C++如何下用socket<em>接收</em>从web上<em>post</em>上来的信息,包括url中的&后的信息和<em>post</em>所发的信息,比如<em>post</em>上来一个xml格式的<em>数据</em>?
C#webapi接收app发送post请求,包括数据和图片
【1】HttpContext获取http请求 HttpContext context = HttpContext.Current; 在业务层需要取得当前页面层的Session,Request,Response,Server时可以通过 Http.Current来获得 参考https://www.cnblogs.com/zhouyunbaosujina/p/3164956.html 【2】 判...
httpClient4发送gzip的post数据,servlet接收并解压
1、gzipUtils工具类: package nc.edu.nuc.utils; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.zip.GZIPInputStream; import java.uti
接收POST发送数据时,如何转换编码?
GET方式用下面的代码解决了,POST的应该如何处理呢rn想到过可以用Request.BinaryRead(),具体怎么处理还没想出来rnrnNameValueCollection parms = HttpUtility.ParseQueryString(context.Request.Url.Query, Encoding.GetEncoding(_charset))
fetch post 后台接收不到数据问题
这两天在做fetch()的<em>post</em>,可是传递到后台,怎么都是null,GET PUT都没有<em>问题</em>,就是<em>post</em>有<em>问题</em>,试过网页的没有<em>问题</em>,但是<em>post</em>的就是不行,使用了网上的 method: &quot;POST&quot;,             mode: &quot;cors&quot;,             headers: {                 &quot;Content-Type&quot;: &quot;application/...
MVC4 接收json格式post数据问题
场景描述:rn后台action<em>接收</em> 外部程序<em>发送</em>的<em>post</em><em>数据</em>与get参数rn public string Index(string type, string key, string device)rnget参数顺利获得到type,key与device里,请问<em>post</em><em>数据</em>如何获取?rn外部程序<em>post</em>的json格式如下:"WhereField":"CategoryID","IsDesc":1,"WhereString":"001"}rn我用Request.InputStream取不到,长度始终是0,rn请问应该如何获取或者解决方案
一个关于socket接收post数据问题
写了一个MyServer模拟http server <em>接收</em><em>post</em>请求。rnjava代码:rn[code=Java]rnpackage socket;rnrnimport java.io.*;rnimport java.net.*;rnrnpublic class MyServer rn public static void main(String args[]) throws Exceptionrn ServerSocket serverSocket = new ServerSocket(8080);rn System.out.println("server is ok.");rn while(true)rn Socket socket = serverSocket.accept();rn BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));rn String line = in.readLine();rn while(line!=null)rn System.out.println("Client: " + line);rn line = in.readLine();rn rn System.out.println("current user close the session.");rn in.close();rn socket.close();rn rn rnrn[/code]rnrn用浏览器打开下面的html文件,并提交<em>数据</em>:rn[code=HTML]rn rn test my server rn rn rn rn upload rn rn rnrn 18rn 20rn 22rn rnrnrn rnrn[/code]rnMyServer打印出来的<em>数据</em>开始还正常:rnserver is ok.rnClient: POST /testupload.jsp HTTP/1.1rnClient: Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*rnClient: Referer: http://localhost:8080/<em>post</em>.htmlrnClient: Accept-Language: zh-cnrnClient: User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)rnClient: Content-Type: application/x-www-form-urlencodedrnClient: Accept-Encoding: gzip, deflaternClient: Host: localhost:8080rnClient: Content-Length: 28rnClient: Connection: Keep-AlivernClient: Cache-Control: no-cachernClient:rn走到这里的时候, 按http协议,接下来浏览器该传送<em>post</em>的<em>数据</em>了,但是程序走到这里就不走了。当我按esc之后,<em>post</em><em>数据</em>才被提交上去rnClient: myname=wwwwwwwwwwww&myage=18rncurrent user close the session.rnrn很奇怪!rn高手出来!
请教一个关于接收POST数据问题
其中一个PHP程序使用下面的方法给我POST过来的<em>数据</em>rnrn$fsp = fsockopen($host, $port, &$errno, &$errstr, 30);rn if(!$fsp)rn print "601\nopen socket failed\n";rn elsern fwrite($fsp, "POST ".$path." HTTP/1.0\r\n");rn fwrite($fsp, "Host:".$host."\r\n");rn fwrite($fsp, "Content-Type: text/xml\r\n");rn fwrite($fsp, "Content-Length: ".strlen($<em>post</em>Data)."\r\n\r\n");rn fwrite($fsp, $<em>post</em>Data);rn fclose($fsp);rn print "200\n<em>post</em> data success\n$reportFile\nrnrnrn请问,我用asp应该如何<em>接收</em>这个<em>数据</em>呢..请高手指点!·
一个接收Post来数据问题
最近在做工行银企互联接入的项目,工行会主动把<em>数据</em>通过<em>post</em>的方式,<em>发送</em>到我们的一个地址,地址为:http://ip:端口,我该如何获取<em>发送</em>过来的<em>数据</em>呢?折腾了半天,没搞定,头都大了,盼各位老大支招,多谢。rnrn注:1.能否用一个默认页面(如default.aspx)来<em>接收</em>?rnrn2.能否给个例子,谢谢。rnrn
腾讯微博客户端发送数据
这几天在分析如何解析手机微博<em>客户端</em><em>发送</em>的<em>数据</em>的<em>问题</em>,在分析到腾讯微博的时候遇到了<em>问题</em>,不知道如何解析,我在电脑上装了安卓模拟器,用wireshark捕获<em>客户端</em>和服务器之间的通信<em>数据</em>,以下是http头之后的<em>数据</em>:rn[color=#FF0000]0000 00 00 01 e4 10 02 2c 3c 4c 56 0f 4d 69 63 72 6f ......,..rn00a0 00 14 0d 00 00 10 39 31 43 44 45 46 42 46 43 34 ......91CDEFBFC4rn00b0 38 35 30 32 38 46 06 03 73 69 64 18 00 01 06 06 85028F..sid.....rn00c0 73 74 72 69 6e 67 1d 00 00 1a 06 18 41 55 56 39 string......AUV9rn00d0 45 6a 49 48 78 41 77 4e 49 76 77 36 45 48 63 4c EjIHxAwNIvw6EHcLrn00e0 4e 58 78 65 06 07 6e 65 74 54 79 70 65 18 00 01 NXxe..netType...rn00f0 06 04 63 68 61 72 1d 00 00 02 00 63 06 08 61 72 ..char.....c..arrn0100 65 61 63 6f 64 65 18 00 01 06 05 73 68 6f 72 74 eacode.....shortrn0110 1d 00 00 03 01 04 04 06 04 77 73 69 64 18 00 01 .........wsid...rn0120 06 06 73 74 72 69 6e 67 1d 00 00 1b 06 19 41 4d ..string......AMrn0130 5a 58 52 61 6a 61 6f 63 35 62 61 72 56 69 70 76 ZXRajaoc5barVipvrn0140 6f 33 70 74 41 3d 3d 06 06 63 61 6e 6e 6f 6e 18 o3ptA==..cannon.rn0150 00 01 06 0a 6c 69 73 74 3c 63 68 61 72 3e 1d 00 ....list..rn0160 00 64 0d 00 00 60 fa 42 b7 1f 44 3f 1a 86 0b e6 .d...`.B..D?....rn0170 3e b2 3d ec 19 ff fc 99 8c da b5 0c 65 f1 37 1b >.=.........e.7.rn0180 b0 d1 9a b3 a4 2f d1 82 e8 04 09 55 77 1f ea 6f ...../.....Uw..orn0190 b2 17 9d f6 bf f5 ad 6f 2d aa 5e 77 f4 eb ee 88 .......o-.^w....rn01a0 94 47 e1 82 26 af 2d 95 07 ac 6f e4 2a bb 71 9c .G..&.-...o.*.q.rn01b0 46 51 de fb f5 86 ff 3c d5 e0 07 5f ff 63 77 f9 FQ.....<..._.cw.rn01c0 71 d4 f5 9f 86 fc 06 07 76 65 72 73 69 6f 6e 18 q.......version.rn01d0 00 01 06 05 69 6e 74 33 32 1d 00 00 02 00 1c 8c ....int32.......rn01e0 98 0c a8 0c ....[/color]rn看着还原出的ascii码应该不是加密过的,但是就是不知道如何解析,wireshark显示上边的类型是application/octet-stream,请教各位高手怎么才能解析呢
获取客户端发送数据
不会用。NET· 最近需要做一个需求,就是VC下上传文件<em>数据</em>给asp.net。rnrn<em>客户端</em>采用POST提交了一串<em>数据</em>,<em>数据</em>格式大致是:rnguid=xxxx-xxxx-xxxx&filename=xxxxx.xx&filecontent=*****************************rnrn这样。rnrn在asp.net中的page_load方法里,用Request读取<em>数据</em>发现有些<em>问题</em>。rn因为文件内容可能包含有0,常用的以string来接受<em>数据</em>就有<em>问题</em>了,会截断。rn用Request.BinatyRead读取的话,都读取到一个byte数组里,如何把我需要的filecontent部分取出来就是个<em>问题</em>了,因为文件内容包含的字符可能就有前面的部分,不能简单的以字符来分割了。rnrn如何获取这段<em>数据</em>呢?
c#发送接收get,post消息
c#后台获取<em>post</em>消息,get消息就用Request.QueryString[“key”]if (HttpContext.Current.Request.HttpMethod.ToUpper() == "POST") { Stream bs = HttpContext.Current.Request.InputStream; byte[] buff = new byte[bs.Le
AFN用post发送的parameters在Java后台接收
因为之前传的参数都是json格式,也有可能是form-data格式,PHP后台都可以<em>接收</em>,现在的Java后台不能<em>接收</em>这种格式,所以请求失败了。需要修改AFNetworking的requestSerializer  网上看到设置: [manager.requestSerializer setValue:@"application/x-www-form-urlencoded" forH
小程序发送接收post参数
会员免费看,http://edu.csdn.net/lecturer/842 右侧可办理会员卡。微信小程序开发是子恒老师《子恒说微信小程序》视频教程的第3部。详细讲解了小程序项目开发。内容包含三个典型应用项目开发:充值,订餐,微商城,涉及到微信小程序前端,登录,小程序支付,购物车等等。欢迎反馈,微信号:QQ68183131
使用Nancy接收Post请求发送的Json字符串
导入Nancy Nancy的使用: 代码段: using Nancy; using Nancy.Extensions; using Newtonsoft.Json; using System.Collections.Generic; namespace Info { public class PersonApi : NancyModule { #regio...
C# POst 接收发送XML(转)
项目分成两个 web(ASP.Net)用户处理请求,<em>客户端</em>(wpf/winform)<em>发送</em>请求 1.web项目 有两个页面 SendPost.aspx(单纯<em>发送</em><em>数据</em>给<em>客户端</em>) 代码: public partial class SendPost : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {...
C#方式Post方式发送xml及接收
RT,我需要做个demo aa.aspx.cs里面<em>post</em>一个xml格式<em>数据</em>到bb.aspx页面该如何做?rn我试了以下代码rnrnrn [align=left] string <em>post</em>Xml = "WXCSzs@0822*hxyd" +rn "0760ZSWXSZtest" +rn "A A1ALS 1" +rn " ";rn string url = "http://localhost:3496/BusRoute.aspx";rn HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url);rn myRequest.Method = "POST";rn myRequest.ContentType = "application/x-www-form-urlencoded";rn myRequest.ContentLength = <em>post</em>Xml.Length;rn Stream newStream = myRequest.GetRequestStream();rn byte[] data = Encoding.GetEncoding("GB2312").GetBytes(<em>post</em>Xml);rn // <em>发送</em><em>数据</em> rn newStream.Write(data, 0, data.Length);rn HttpWebResponse res = myRequest.GetResponse() as HttpWebResponse;rn StreamReader sr = new StreamReader(res.GetResponseStream(), Encoding.UTF8);rn String ret = sr.ReadToEnd();rn XmlDocument doc = new XmlDocument();rn doc.LoadXml(ret);rn string mes = doc.GetElementsByTagName("resultInfo")[0].InnerText;[/align]rnrnrnrn结果在HttpWebResponse res = myRequest.GetResponse() as HttpWebResponse;执行到这句是报rn远程服务器返回错误: (500) 内部服务器错误。rnrn代码没有<em>问题</em>,可是url改成“http://120.197.89.32/ELIS/lbsServle”就可以正确返回结果,现在我想在本地程序http://localhost:3496/BusRoute.aspx测试改怎么做?rnrn求高手解决!!!!!
https Post xml 发送xml和接收xml
个为大侠帮我看看,我想服务器<em>发送</em>xml文件和接受xml文件,但就是<em>接收</em>不到值rn /// rn /// 以Post方式,<em>发送</em>xml文件rn /// rn /// URLrn /// 服务器返回的XML文件rn public string SendCommand(string Url)rn rn string ReceiveXml="";rn bool bResturl=true;rnrn //<em>发送</em>URL资源rn ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateCallback;rn HttpWebRequest myHttpWebRequest = WebRequest.Create(Url) as HttpWebRequest;rn tryrn rn //以Post方式<em>发送</em>rn myHttpWebRequest.Method = "POST";rn //得到已近组装好的xml文件rn string xml = GetXml();rn //把xml文件转换utf8格式rn byte[] byte1 = System.Text.Encoding.UTF8.GetBytes(xml);rn //<em>发送</em>的类型rn myHttpWebRequest.ContentType = "application/x-www-form-urlencoded";rn //设置请求<em>发送</em>的字符长度rn myHttpWebRequest.ContentLength = byte1.Length;rn //获得与远程的连接rn Stream newStream = myHttpWebRequest.GetRequestStream();rn //<em>发送</em>rn newStream.Write(byte1,0,byte1.Length);rn //关闭rn newStream.Close();rn rn catch (Exception ex)rn rn bResturl=false;rn HttpContext.Current.Response.Write(ex.ToString());rn rn rn tryrn rn //当返回为true时,<em>接收</em>返回值rn if (bResturl)rn rn ReceiveXml = null;rn rnrn StreamReader read = new StreamReader(myHttpWebRequest.GetResponse().GetResponseStream());rn ReceiveXml = read.ReadToEnd();rn rn catch (Exception ex)rn rn HttpContext.Current.Response.Write(ex.ToString());rn rn return ReceiveXml;rn rnrn /// rn /// 总是接受rn /// rn /// rn /// rn /// rn /// rn /// rn public bool RemoteCertificateCallback(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)rn rn if (errors == SslPolicyErrors.None)rn rn return true;rn rn elsern rn return false;rn rn rnrn每次执行到,总是接受的方法时 errors 值是 System.Net.Security.SslPolicyErrors.RemoteCertificateNameMismatch | System.Net.Security.SslPolicyErrors.RemoteCertificateChainErrorsrn rn我是第一次接触到这个,希望各位大侠帮帮小弟,小弟感激不尽,麻烦大家帮我把错误指出来,谢谢了啊,比较急,我在线等待,那位好心人如果做过,也可以给我发邮件和QQ,Email:caorui@p3china.com QQ:1007751583rn在线等待 急!急!急!急!急!rn
winhttp post 数据发送
[code=c]#include rn#include rn#include rn#include rnrn#pragma comment(lib, "winhttp.lib")rnrn#define MAX_URL_BUF 2048rnrnURL_COMPONENTS urlComp;rnWCHAR wszPath[MAX_URL_BUF] = 0;rnWCHAR wszHost[MAX_URL_BUF] = 0;rnWCHAR wszExtraInfo[MAX_URL_BUF] = 0;rnint nScheme = 0;rnint nPort = 0;rnrnint AtoW(const char *src, WCHAR *dst, int bufsize, int max_len=-1);rnint WtoA(const WCHAR *src, char *dst, int bufsize, int max_len=-1);rnrnBOOL ParseUrl(LPCWSTR pwszUrl)rnrnrn ZeroMemory(&urlComp, sizeof(urlComp));rn urlComp.dwStructSize = sizeof(urlComp);rnrn urlComp.lpszHostName = wszHost;rn urlComp.dwHostNameLength = MAX_URL_BUF;rnrn urlComp.lpszUrlPath = wszPath;rn urlComp.dwUrlPathLength = MAX_URL_BUF;rnrn urlComp.lpszExtraInfo = wszExtraInfo;rn urlComp.dwExtraInfoLength = MAX_URL_BUF;rnrn if (!WinHttpCrackUrl(pwszUrl, 0, 0, &urlComp)) rn rn printf("WinHttpCrackUrl failed,err=%d\n", GetLastError());rn return FALSE;rn rn nScheme = urlComp.nScheme;rn nPort = urlComp.nPort;rnrn return TRUE;rnrnrnint ConvertPostData(const WCHAR * wPostData, int wLen, char * szPostData)rnrn char tmpData[MAX_URL_BUF] = 0;rnrn int len = WtoA(wPostData, tmpData, MAX_URL_BUF);rnrn char * p = tmpData;rn rn if( *p == '?')rn rn p++;rn len--;rn rn memcpy(szPostData, p, len-1);rn return len;rnrnrnbool <em>post</em>cmd(const char * pszUrl)rnrn WCHAR tmpwszUrl[MAX_URL_BUF] = 0;rn WCHAR szAddHeader[MAX_URL_BUF] = 0;rnrn bool ret = false;rnrn HINTERNET hSession = NULL;rn HINTERNET hConnect = NULL;rn HINTERNET hRequest = NULL;rnrn AtoW(pszUrl, tmpwszUrl, MAX_URL_BUF);rnrn if( !ParseUrl( tmpwszUrl ) )rn rn return FALSE;rn rnrn wcsncpy(szAddHeader, L"Content-Type: application/x-www-form-urlencoded\r\n", MAX_URL_BUF);rn DWORD dwAddHeadLen = wcsnlen(szAddHeader, MAX_URL_BUF);rnrn hSession = WinHttpOpen(NULL,rn WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, rn WINHTTP_NO_PROXY_NAME, rn WINHTTP_NO_PROXY_BYPASS,rn 0);rnrn if( hSession == NULL )rn goto Exit0;rn hConnect = WinHttpConnect(hSession, wszHost, nPort, 0);rnrn if( hConnect == NULL )rn goto Exit0;rnrn hRequest = WinHttpOpenRequest( hConnect, L"POST", wszPath,rn NULL, WINHTTP_NO_REFERER, rn WINHTTP_DEFAULT_ACCEPT_TYPES, rn nScheme == INTERNET_SCHEME_HTTPS ? WINHTTP_FLAG_SECURE : 0);rnrn if( hRequest == NULL )rn goto Exit0;rnrn char szPostData[MAX_URL_BUF] = 0;rn rnrn ConvertPostData(urlComp.lpszExtraInfo, urlComp.dwExtraInfoLength, szPostData);rn int <em>post</em>len = strlen(szPostData);rn rnrn rnrn if( !WinHttpSendRequest( hRequest, szAddHeader, dwAddHeadLen,rn szPostData, <em>post</em>len, <em>post</em>len , 0 ) )rn rn printf("<em>发送</em>http请求失败,err=%d\n",GetLastError());rn goto Exit0;rn rnrn if( !WinHttpReceiveResponse(hRequest, NULL) )rn rn printf("请求respsonse失败, err=%d\n", GetLastError());rn goto Exit0;rn rnrn DWORD dwQueryData;rn DWORD dwQueryDataSize = sizeof(dwQueryData);rnrn if(! WinHttpQueryHeaders(hRequest, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, WINHTTP_HEADER_NAME_BY_INDEX, rn &dwQueryData, &dwQueryDataSize, WINHTTP_NO_HEADER_INDEX) )rn goto Exit0;rnrn if( dwQueryData != HTTP_STATUS_OK )rn rn printf("status code error:%u\n", dwQueryData);rn goto Exit0;rn rn ret = true;rnExit0:rn if( hRequest )rn WinHttpCloseHandle(hRequest);rn if( hConnect )rn WinHttpCloseHandle(hConnect);rn if( hSession )rn WinHttpCloseHandle(hSession);rn return ret;rnrnrnint main()rnrn <em>post</em>cmd("http://localhost/login.html?param=xxx");rnrnrnrnrnrnrnrnrnrnint AtoW(const char *src, WCHAR *dst, int bufsize, int max_len)rnrn int len = ::MultiByteToWideChar(CP_ACP, 0, src, max_len, dst, bufsize);rnrn if (len == 0 && dst && bufsize > 0) rn if ((len = (int)wcsnlen(dst, bufsize)) == bufsize) rn dst[--len] = 0;rn rn rnrn return len;rnrnrnint WtoA(const WCHAR *src, char *dst, int bufsize, int max_len)rnrn if (bufsize == 1) rn *dst = 0;rn return 0;rn rnrn int affect_len = bufsize ? bufsize - 1 : 0;rn int len = ::WideCharToMultiByte(CP_ACP, 0, src, max_len, dst, affect_len, 0, 0);rnrn if (len == 0 && dst && bufsize > 0) rn if ((len = (int)strnlen(dst, affect_len)) == affect_len) rn dst[len] = 0;rn rn rnrn return len;rnrnrn[/code]rn请问代码哪里有<em>问题</em>。<em>post</em>的<em>数据</em>没法送到。
jQuery post发送不了数据
$.<em>post</em>(url,name:"sgl",this.callback);rnrn怎么带不了<em>数据</em>,一带就报错,在URL后连接参数是可以的,不知道是怎么回事,往高手指点指点。rnrn 先谢谢了。
http post 发送xml数据
NULL 博文链接:https://waynett.iteye.com/blog/1129581
关于接收POST的问题
我想用VB写个软件来<em>接收</em>网页POST或GET过来的信息rnrn请给个思路.应该怎么做rnrn最好能有关键代码rnrn谢谢!
HttpURLConnection 发送(POST)数据到服务器
URL url = new URL("http://xxx.xxx.xxx"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setConnectTimeout(8000); connect
接收post传值的问题
使用ajax的<em>post</em>方法传值,在处理页面中怎样获得这个值呢?rn试验了用Request.QueryString[0]不能获取rn请各位高手指教
串口通讯中接收发送float类型数据
使用共用体来解决<em>数据</em>的编解码<em>问题</em>,共用体可以使不同的<em>数据</em>类型来共享相同的地址空间。#include #include int main(void) { union result { float d; unsigned char data[4]; }r1,r2; // 特别需要注意的是在单片机中in
在CAsyncSocket中如何发送接收OOB数据
谁在CAsyncSocket<em>发送</em>和<em>接收</em>过OOB<em>数据</em>?rn我在程序中使用时,<em>发送</em>后,激发的是OnReceive和OnOutOfBandData,并且,每次在OnOutOfBandData中只能收到1各字节,其他的都到OnReceive中去了。rnrn如果只发1个字节,那么,<em>接收</em>正常。MSDN说,OOB是和带内<em>数据</em>是逻辑上独立的两个通道,为什么我的OOB不能正常<em>接收</em>呢?rnrn我的send(....,MSG_OOB) Receive(.....,MSG_00B)rnrn请高手指点
JSP网页如何接收VC客户端POST的数据
rn我用VC<em>客户端</em>通过WinInet编程<em>发送</em><em>数据</em>给JSP网页,rn程序如下:rnCInternetSession psess;rn CHttpFile* pfile=NULL;rn CHttpConnection* pconn=NULL;rn //建立连接rn tryrn rn pconn=psess.GetHttpConnection(strURL);rn pfile=pconn->OpenRequest(CHttpConnection::HTTP_VERB_POST,NULL,NULL,1,NULL,NULL,INTERNET_FLAG_KEEP_CONNECTION);//用POST方式<em>发送</em>请求rn pfile->AddRequestHeaders(strheaders);rn pfile->SendRequestEx(DataMSG.GetLength());rn pfile->WriteString(DataMSG);rn pfile->EndRequest();//结束请求rn请问在网页端怎么<em>接收</em>到<em>发送</em>的DataMSG<em>数据</em>啊,
Jetty 怎么接收客户端post传过来的数据?(http)
public JSONObject getPostBodyData(HttpServletRequest request , String ....param){ request.setCharacterEncoding(UTF-8); reader = new BufferReader(new InputStreamReader(request.getInputStrea...
写的HTTP客户端与服务端,但是不能接收post数据
服务端代码rn[code=csharp]rnstatic void Main(string[] args)rnrn using (HttpListener listerner = new HttpListener())rn rn listerner.AuthenticationSchemes = AuthenticationSchemes.Anonymous;//指定身份验证 Anonymous匿名访问rn listerner.Prefixes.Add("http://localhost:8080/web/");rn listerner.Prefixes.Add("http://localhost:8080/web2/");rn listerner.Start();rn Console.WriteLine("WebServer Start Successed.......");rn while (true)rn rn //等待请求连接rn //没有请求则GetContext处于阻塞状态rn HttpListenerContext ctx = listerner.GetContext();rn ctx.Response.StatusCode = 200;//设置返回给客服端http状态代码rn string name = string.Empty;rnrn string Url= ctx.Request.Url.ToString();rnrn using (StreamWriter writer = new StreamWriter(ctx.Response.OutputStream))rn rn switch (Url)//1rn rn case "http://localhost:8080/web/":rn writer.WriteLine("web1");rn name = ctx.Request.QueryString["object"];rn //writer.Close();rn //ctx.Response.Close();rn break;rn case "http://localhost:8080/web2/":rn writer.WriteLine("web2");rn writer.Close();rn ctx.Response.Close();rn break;rnrn rn rn rn rn if (name != null)rn rn Console.WriteLine(name);rn rn rnrn rn[/code]rnrn<em>客户端</em>代码rn[code=csharp]rnstatic void Main(string[] args)rnrnrn string url = "http://localhost:8080/web/";rnrn Model.Class1 c = new Model.Class1() name = "chenqiang", Number = "01" ;rn IFormatter formatter = new BinaryFormatter();rn MemoryStream stream = new MemoryStream();rn formatter.Serialize(stream, c);rn stream.Position = 0;rn byte[] buffer = new byte[stream.Length];rn stream.Read(buffer, 0, buffer.Length);rn stream.Flush();rn stream.Close();rn //Convert.ToBase64String(buffer)rn //<em>发送</em>rnrn System.Text.Encoding myEncode = System.Text.Encoding.GetEncoding("UTF-8");rn string strContent = HttpUtility.UrlEncode("测C#定时" + DateTime.Now.ToString(), myEncode);rn Console.WriteLine(HttpSend.<em>post</em>Send(url, "object=111" + "&content=" + strContent));rn Console.Read();rnrn[/code]rnrnPost方法代码rn[code=csharp]rnpublic static string <em>post</em>Send(string url, string param)rnrn System.Text.Encoding myEncode = System.Text.Encoding.GetEncoding("UTF-8");rn byte[] <em>post</em>Bytes = System.Text.Encoding.ASCII.GetBytes(param);rnrnrn HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url);rn req.Method = "POST";rn req.ContentType = "application/x-www-form-urlencoded;charset=UTF-8";rn req.ContentLength = <em>post</em>Bytes.Length;rnrn tryrn rn using (Stream reqStream = req.GetRequestStream())//2rn rn reqStream.Write(<em>post</em>Bytes, 0, <em>post</em>Bytes.Length);rn rnrn using (WebResponse res = req.GetResponse())rn rn using (StreamReader sr = new StreamReader(res.GetResponseStream(), myEncode))rn rn string strResult = sr.ReadToEnd();rn return strResult;rn rn rnrn rn catch (WebException ex)rn rn return "无法连接到服务器\r\n错误信息:" + ex.Message;rn rnrnrn[/code]rnrn当<em>客户端</em>运行到到2这里时便开始执行服务器//1的代码了在提交<em>数据</em>流之前就开始处理了这是为什么,请大神帮帮忙
Servlet里怎么接收客户端post上来的二进制数据呢?
俺用ServletInputStream不行吗?rn有别人做好的现成的类,会用,但不明白其中的道理,所以…能不能给讲解一下?俺是新手,刚登录进来的,。
发送post请求问题
有哪位大牛指导一下,这个<em>问题</em>困扰我半天了!我在跟其他公司的一个系统进行对接时,给对方系统<em>发送</em>一个<em>post</em>的请求rn这是我的写的方法:rntry rn URL url = new URL( "https://epcis-ptp-stg.dmzstg.pingan.com.cn:19443/epcis.ptp.partner.getAhsEPolicyPDFWithCert.do?"); rn URLConnection connection = url.openConnection(); rn connection.setDoOutput(true); rn //<em>发送</em>域信息 rn OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream(), "8859_1"); rn out.write( "umCode="+umCode+"&validateCode="+validateCode+"&policyNo="+policyNo+"&isSeperated="+isSeperated+"&curTime="+curTime+"&signValue="+signValue);//这里组织域信息 rn out.flush(); rn out.close(); rn //获取返回<em>数据</em> rn InputStream in = connection.getInputStream(); rnrn catch (MalformedURLException e) rn // TODO Auto-generated catch block rn e.printStackTrace(); rn catch (UnsupportedEncodingException e) rn // TODO Auto-generated catch block rn e.printStackTrace(); rn catch (IOException e) rn // TODO Auto-generated catch block rn e.printStackTrace(); rn rn调试后我发现:总在connection.getOutputStream()时出异常。说是证书方面的<em>问题</em>。错误提示是:rnjavax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targetrn at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)rn at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1476)rn at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)rn at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)rn at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:847)rn at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)rn at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)rn at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)rn at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:815)rn at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025)rn at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1038)rn at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:402)rn at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)rn at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)rn at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)rn at cn.com.caissa.erp.insurance.insbill.bs.impl.InsBillBs.getSignValue(InsBillBs.java:451)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:61)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:116)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)rn at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152)rn at $Proxy64.getSignValue(Unknown Source)rn at cn.com.caissa.erp.insurance.insbill.action.InsBillAction.getSignValue(InsBillAction.java:330)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at venus.frames.base.action.DefaultDispatchAction.service(DefaultDispatchAction.java:339)rn at venus.frames.base.action.BaseAction.execute(BaseAction.java:172)rn at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)rn at venus.frames.base.action.DefaultServlet.process(DefaultServlet.java:191)rn at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at gap.logOperation.util.UserInfoBuilder.doFilter(UserInfoBuilder.java:98)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at com.use.filter.SignonFilter.doFilter(SignonFilter.java:62)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at venus.frames.web.SetEncodingFilter.doFilter(SetEncodingFilter.java:33)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at com.jamonapi.JAMonFilter.doFilter(JAMonFilter.java:57)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:595)rnCaused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targetrn at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:221)rn at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:145)rn at sun.security.validator.Validator.validate(Validator.java:203)rn at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)rn at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)rn at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:840)rn ... 60 morernCaused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targetrn at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:236)rn at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)rn at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:216)rn ... 65 morern2012-10-16 11:56:58 org.apache.catalina.core.ApplicationDispatcher invokern严重: Servlet.service() for servlet jsp threw exceptionrn哪位大牛指点。。。谢了...
MFC实现数据发送接收
简单的MFC通信程序的编写,可以实现<em>客户端</em>和服务器之间的<em>数据</em>的单向传输,可以在一台机器上同时运行<em>客户端</em>和服务器程序,观察效果
C++ USB数据接收发送
C++ USB<em>数据</em><em>接收</em>与<em>发送</em>,USB<em>数据</em><em>接收</em>与<em>发送</em>,USB<em>数据</em><em>接收</em>与<em>发送</em>
C#串口数据接收发送
按照伍兄的博文抄下来的。 博文地址:http://www.cnblogs.com/wuhuacong/archive/2011/07/19/2111055.html#commentform 为了赚点下载分。谢谢!
protobuf发送接收数据
protobuf可以将空数组转换成对象,并且,如果protobuf对象中没有给任何属性设置值,那转换成的byte[]数组是空的。 如果protobuf对象没有属性,也可以接受一个非空数组反序列化成protobuf对象(兼容) protobuf代码如下: syntax = &quot;proto2&quot;; message Ddata{ repeated data dataList =1; option...
Postman发送 raw数据接收问题
之前一直都在用form-data传值,今天用raw这个传值,$_POST死活接不到值,查看了文档才发现得用$GLOBALS[‘HTTP_RAW_POST_DATA’]<em>接收</em>值,因为raw类型传过来的值没有key,或者说不是k-v类型,另外能用上面的方法得有条件: php配置中,必须启用 always_populate_raw_<em>post</em>_data always_populate...
spcomm发送接收,数据长度问题.
[img=https://img-bbs.csdn.net/upload/201311/20/1384919011_763022.jpg][/img]rnrnrn如上图,我开始<em>发送</em>rn52 00 00 09 5Brnrn<em>接收</em>是OK的.rnrn但是后面我<em>发送</em>rn52 00 00 00 52rnrn但是被先<em>接收</em>52 rn其他几个是后续才<em>接收</em>到...rnrn这样就奇葩的BUG就出现了.rnrnrn求大神指教这个bug产生的原因,以及处理方法.
请教Socket,数据发送接收问题
小弟最近在研究SOCKET,现在出现发现一个<em>问题</em>。rn就是我需要在<em>发送</em>消息后等待消息<em>接收</em>,rn比如说:我一个方法里面,要<em>发送</em><em>数据</em>到一个<em>客户端</em>,同时需要<em>接收</em>到<em>客户端</em>的<em>数据</em>之后,才完成该方法,请问大树具体怎么实现,或者一些思路!谢谢!
nRF24L01数据发送、中继和接收
2.4G无线模块nRF24L01,用于<em>数据</em><em>发送</em>、中继和<em>接收</em>。有待完善。
mailbox数据发送接收的过程
我们知道在client 在通过mbox_send_message给controller<em>发送</em><em>数据</em>的时候必须指定channel。例如下面的code dc_sync->mbox = (&dc_sync->cl, 0); /* Populate data packet */ /* sp.abc = 123; etc */ /* Send message to remote in blocking
Socket 发送 接收 数据 c#
Socket <em>发送</em> <em>接收</em> <em>数据</em> c#Socket <em>发送</em> <em>接收</em> <em>数据</em> c#
多线程发送接收串口数据
目前多线程<em>接收</em>,解析<em>数据</em>处理好了,但用多线程<em>发送</em><em>数据</em>时<em>数据</em>出了<em>问题</em>,一是有些指令没有<em>数据</em>返回,二是线程执行顺序是错了,我是用c#.NET 线程池处理的rnrn小弟想实现这样的功能,用多线程<em>发送</em><em>数据</em>,多线程<em>接收</em><em>数据</em>,多线程解析<em>数据</em>,保证实时读取串口<em>接收</em>的<em>数据</em>。可下面贴出来的这些方法没有实现要的功能,琢磨了快一个星期了,希望各位大哥指教,能给好的指导思想,有串口多线程<em>发送</em>,<em>接收</em>的项目例子更好。rnrn /// rn /// <em>发送</em>多条指令,用异步的方式<em>接收</em><em>数据</em>rn /// rn /// <em>发送</em>的<em>数据</em>和读取返回的<em>数据</em>)rn /// true 读取返回的<em>数据</em> false 不返回<em>数据</em>)rn /// rn public bool SendData(string[] cmd, string tagData, bool fag)rn rn DateTime a1 = DateTime.Now;rn //for (int i = 0; i < 1000; i++)rn //rn foreach (string s in cmd)rn rn if (s == string.Empty || tagData == string.Empty)rn return false;rn if (!serialState)rn this.InitPortCom();rn tab = parms.PtlParms(s);rn if (tab == null || tab.Rows.Count == 0)rn return false;rn DataRow frameData = tab.Select(string.Format("type='0' and name='1' ", "Output", "命令长度"))[0];rn int frameLen = Convert.ToInt32(basefun.valtag(frameData["pms"].ToString(), "命令长度")) * 2 + 12;rn byte[] buffData = analy.SetPtlData(tab, tagData);rn serialPort.Write(buffData, 0, buffData.Length);rn this.WaiteSendData(new SendTaskInfo(buffData, s));rn this.WaiteReceiveData(new ReceiveTaskInfo(s, frameLen));rn this.WaitAnalysisData(new ReceiveTaskInfo(s, frameLen));rn rn return true;rn rnrn /// rn /// 开启线程循环<em>发送</em><em>数据</em>rn /// rn private void WaiteSendData(object data)rn rn if (!serialPort.IsOpen) rn return;rn SendTaskInfo state = data as SendTaskInfo;rn System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(ThreadSend), state);rn rnrn /// rn /// 开启线程循环取帧rn /// rn private void WaiteReceiveData(object data)rn rn if (!serialPort.IsOpen) return;rn ReceiveTaskInfo state = data as ReceiveTaskInfo; rn System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(ThreadReceive), state);rn rnrn /// rn /// 开启线程解析<em>数据</em>rn /// rn /// rn private void WaitAnalysisData(object data)rn rn if (!serialPort.IsOpen) return;rn ReceiveTaskInfo state = data as ReceiveTaskInfo;rn System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(GetData), state);rn rnrn /// rn /// 开启一个线程<em>发送</em><em>数据</em>rn /// rn /// rn private void ThreadSend(object state)rn rn SendTaskInfo send = state as SendTaskInfo;rn lock (ThreadObject)rn rn Debug.Write("ThreadSendOne" + " " + send.cmdName + ":" + DateTime.Now.ToString("mm:ss.ffff") + "\r\n");rn SendTaskInfo data = state as SendTaskInfo;rn byte[] buffData = data.sendData;rn serialPort.Write(buffData, 0, buffData.Length);rn Debug.Write("ThreadSendTwo" + " " + System.Text.Encoding.ASCII.GetString(buffData) + ":" + DateTime.Now.ToString("mm:ss.ffff") + "\r\n");rn Thread.Sleep(300);rn rn rnrnrn /// rn /// 开启一个线程<em>接收</em><em>数据</em>rn /// rn /// rn private void ThreadReceive(object state)rn rn ReceiveTaskInfo task = state as ReceiveTaskInfo;rn List tmpList = new List();rn Debug.Write("ThreadReceive1" + " " + task.cmdName + ":" + DateTime.Now.ToString("mm:ss.ffff") + "\r\n");rn bool lenState = false;rn //manulReadEvent.Reset();rn //bool fag = manulReadEvent.WaitOne();rn //if (!fag) return;rn lock (ThreadObject)rn rn while (!lenState)rn rn if (serialPort.BytesToRead > 0)rn rn byte[] buff = new byte[serialPort.BytesToRead];rn serialPort.Read(buff, 0, buff.Length);rn tmpList.AddRange(buff);rn if (tmpList.Count != task.cmdLen)rn continue;rn elsern rn lenState = true;rn Debug.Write("ThreadReceive2" + " " + tmpList.Count + ":" + DateTime.Now.ToString("mm:ss.ffff") + "\r\n");rn returnBuff.Enqueue(tmpList.GetRange(0, task.cmdLen).ToArray());rn tmpList.Clear();rnrn //manulWriteEvent.Set();rn rn rn elsern break;rn rn rn rnrn /// rn /// 解析<em>数据</em>rn /// rn /// rn private void WaitAnalysisData(object data)rn rn if (!serialPort.IsOpen) return;rn ReceiveTaskInfo state = data as ReceiveTaskInfo;rn System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(GetData), state);rn rnrn /// rn /// 解析串口<em>数据</em>rn /// rn /// rn private void GetData(object state)rn rn if (tab == null || tab.Rows.Count == 0 || returnBuff.Count == 0)rn return;rn ReceiveTaskInfo task = state as ReceiveTaskInfo;rn Debug.Write("GetData:" + task.cmdName + ":" + DateTime.Now.ToString("mm:ss.ffff") + "\r\n");rn byte[] buffAll = new byte[0];rn lock (QueueObject)rn rn Debug.Write("returnBuff.Count:" + returnBuff.Count + ":" + DateTime.Now.ToString("mm:ss.ffff") + "\r\n");rn buffAll = returnBuff.Dequeue();rn Debug.Write("buffAll.Count:" + buffAll.Length + ":" + DateTime.Now.ToString("mm:ss.ffff") + "\r\n");rn string len = string.Empty;rn int frameLen = 0;rn byte[] buffTemp = new byte[4];rn for (int i = 0; i < 4; i++)rn rn buffTemp[i] = buffAll[i + 5];rn rn len = GetAscByByte(buffTemp);rn frameLen = Convert.ToInt16(len, 16) + 8;rn if (buffAll.Length < frameLen)rn return;rnrn string returnStr = string.Empty;rn returnStr = GetAscByByte(buffAll);rn Debug.Write(returnStr + ":" + DateTime.Now.ToString("mm:ss.ffff") + "\r\n");rn bool fag = analy.GetPtlData(tab, returnStr, ref data);rn if (!fag) return;rn if (returnData.ContainsKey(task.cmdName.Trim()))rn rn returnData.Remove(task.cmdName.Trim());rn returnData.Add(task.cmdName.Trim(), data);rn rn elsern rn returnData.Add(task.cmdName, data);rn rn Debug.Write(data + "1:" + DateTime.Now.ToString("mm:ss.ffff") + "\r\n");rn if (dataFromPromEventHandle != null)rn dataFromPromEventHandle(this, null);rn Thread.Sleep(300);rn rn rn
应用间的数据接收发送
两个应用互相<em>发送</em><em>数据</em>还是很简单的。 一 简单<em>数据</em>的<em>发送</em> 1.1 <em>发送</em>文本内容 Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send."); sendInte
c#接收发送can数据
c#<em>接收</em><em>发送</em>can<em>数据</em>,
udp 发送接收结构体数据
windows下udp<em>发送</em>和<em>接收</em>结构体<em>数据</em>
iOS的蓝牙连接 数据接收发送
说明:苹果官方开发文档中涉及一些名词:Central(中心设备)、Peripheral(外围设备)、advertising(广告)、Services(服务)、Characteristic(特征)等,我都用括号内的中文进行翻译,并且不做详细解释,可能存在误导,请谅解。 目录:   步骤1.建立一个Central Manager实例进行蓝牙管理 步骤2.搜索外围设备 步骤
串口的数据发送接收
用于串口的<em>数据</em><em>发送</em>和<em>接收</em>,用之前必须先建立连接,否则将报异常
kafka的数据发送接收java_API
往消息队列里面<em>发送</em><em>数据</em>import kafka.javaapi.producer.Producer; import kafka.producer.KeyedMessage; import kafka.producer.ProducerConfig;import java.io.IOException; import java.util.Properties;import scala.math.Num
串口设备数据发送接收
我有一个简单的串口设备,叫满意度评价器。rn控制它需要传递参数分别为0x01、0x02、0x03、0x04、0x05、0x06、0x07、0x08、0x09、0x0a(十种情况)rn采用win API 函数 WriteFile()我不会传递,所以用mscomm32.ocx,ole_1.object.output = blob(char(1)) 可以实现<em>发送</em>0x01的效果。同样blob(char(2~10))能分别实现以上所有功能。rn然而,<em>接收</em>时出现<em>问题</em>:我是用rnBOLB lb_datarnIF ole_1.object.InBufferCount <> 0 THEN rn lb_data=ole_1.object.inputrn if lb_data = blob(char(1)) thenrn //没有进入rn end ifrn if lb_data = blob(char(2)) thenrn //没有进入 rn end ifrn if lb_data = blob(char(3)) thenrn //没有进入 rn end ifrn if lb_data = blob(char(4)) thenrn //没有进入 rn end ifrnEND IFrn设备说明上说<em>接收</em>到的<em>数据</em>应该分别为0x01、0x02、0x03、0x04rn我应该如何处理?如何判断<em>接收</em>到的<em>数据</em>?rnrn如果采用WIN API 函数如何传递以上<em>数据</em>?rn我发现mscomm32.ocx不好用,每次开机都要我重新注册,所以如果可能最好还是用 WIN API 函数。
如何接收发送UDP包数据
遇到一个设备 使用UDP通信的 <em>发送</em>端口号为1868,<em>接收</em>端口号为1858。rn我写了个连接的代码,结果提示“请求的协议没有在系统中配置或者没有它存在的迹象”rn[code=C#]rnprivate IPAddress HostIP = IPAddress.Parse("192.168.0.118");rn private IPEndPoint ChatSever;rn private Socket ChatSocket;rnChatSever = new IPEndPoint(HostIP, Int32.Parse("1858"));rn ChatSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Udp);rn ChatSocket.Connect(ChatSever);rn[/code]rnrn高手帮忙 希望能给出段例子最好
arp, rarp, 数据发送接收
我有个<em>问题</em>:如何使用C或者C++或者MFC库,而不使用如winpcap之类的开发包,将我的ARP,RARP<em>数据</em>包在WINDOWS下,通过网卡<em>发送</em>出去。
如何实现数据发送接收
我看到有一些软件可以将<em>数据</em>库(access的)内的<em>数据</em><em>发送</em>到软盘上,生成的文件后缀是.dat 的,然后拿到上一级单位的计算机内对软盘进行<em>接收</em>,就可以将几个地方的<em>数据</em>统一汇总成一个<em>数据</em>库,这是如何实现的呢?!rn请教各位大侠能够解惑,先谢谢了!!!
UDP数据发送接收程序
一个很简单、很使用的UDP<em>数据</em>收发程序,适合网络编程初学者
Qt5串口发送/接收中文数据问题
本文主要介绍Qt5中串口<em>发送</em>和<em>接收</em>中文<em>数据</em>的处理办法,只给出关键代码。 <em>发送</em>中文<em>数据</em> void Serial::send_ascii(QString str) { str = ui-&gt;textSend-&gt;toPlainText(); // 要能正确<em>发送</em>中文字符,需要使用QString的toLocal8Bit方法 // serial-&gt;write(str.to...
关于串口数据发送接收问题
Q: 串口<em>数据</em>通过单片机转发,但是现在单片机每次只能转30以内字节才能稳定,需要把一个比较大文件通过单片机转到另外一个串口上rnrn现在情况:本人把大文件读进缓存,按照每30字节进行打包<em>发送</em>,在另一个串口进行拼接。该方法比较笨,求有没有更好的思路,不需要代码~
usb发送数据上位机接收问题
一个USB模块构成的下位机,以每15ms的速度<em>发送</em>128字节.该USB模块已经将USB虚拟成串口,上位机采用串口编程进行<em>接收</em>,要求128字节的<em>接收</em>,但是缓冲区一次就能有多于128字节的<em>数据</em>到达.rn ClearCommError(hCom, &dwErrorFlags, &ComStat ) dwLength=ComStat.cbInQue ; //输入缓冲区有多少<em>数据</em>.rnint n=dwLength/128;rnfor(int i=0;i
各种格式-excel、word、数据库、ERP系统、自定义报表套打设计工具破解版下载
随心打-格式报表套打设计工具,可以自由的设计报表打印的格式,按照实际的票据模板,自定义设计要打印的内容,及位置,大小,可以插入直线,图片,文本框,等等,可以指定数据源,动态的打印数据,提供功能丰富的按钮,可以快速地设计出适合自已的非常美观的报表,真正做到想怎么打就怎么打,想打哪就打哪。 相关下载链接:[url=//download.csdn.net/download/luojdz/2277922?utm_source=bbsseo]//download.csdn.net/download/luojdz/2277922?utm_source=bbsseo[/url]
android 进度条整理下载
android 进度条整理 android 进度条整理 相关下载链接:[url=//download.csdn.net/download/zly1986a/3285983?utm_source=bbsseo]//download.csdn.net/download/zly1986a/3285983?utm_source=bbsseo[/url]
AT Commands for 5509_EN_1.0.pdf下载
AT Commands for 5509_EN_1.0.pdf ATEL 5509的支持的AT指令。AT指令也是一般都通用的。 相关下载链接:[url=//download.csdn.net/download/ap0304118/3865344?utm_source=bbsseo]//download.csdn.net/download/ap0304118/3865344?utm_source=bbsseo[/url]
我们是很有底线的