是套接字连接不是http上黑莓更快?

编程入门 行业动态 更新时间:2024-10-23 21:39:53
本文介绍了是套接字连接不是http上黑莓更快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在写最初在标准的J2ME实施了黑莓的应用程序。网络连接是用做 Connector.open(插座:// ...:80 / ...)而不是 HTTP:/ /

I'm writing an app for Blackberry that was originally implemented in standard J2ME. The network connection was done using Connector.open("socket://...:80/...") instead of

现在,我实现了使用这两种方法的连接,而且好像有些时候,插座的方法是更加敏感,有的时候也不能在所有工作。有两者之间的显著差异?大多是我想要实现的是从连接顺利拿到了进度条的响应。

Now, I've implemented the connection using both methods, and it seems like some times, the socket method is more responsive, and some times it doesn't work at all. Is there a significant difference between the two? Mostly what I'm trying to achieve is responsiveness from the connection to get a smooth progress bar.

推荐答案

黑莓的实施 HTTP 和 HTTPS 提供用于连接到目标服务器比插座,当然还有更多的选择,实现所有的HTTP协议的东西给你。我没有他们的基准,但它使一定量的意义上说,直接 TCP 通过插座将是更快某些情况下,特别是如果什么端口80听的不是的HTTP服务器(无协议开销)

Blackberry's implementation of http and https provide more options for connecting to the target server than socket, and, of course, implement all the HTTP protocol stuff for you. I've not benchmarked them, but it makes a certain amount of sense that direct TCP via socket would be quicker in some cases, especially if what is listening on port 80 isn't an HTTP server (no protocol overhead)

我已经很难在不同的网络供应商在过去,有些需要 deviceside = TRUE 其他 deviceside = FALSE ,并没有真正的办法知道,直到第一个支持电话为网络进来了。

I've had difficulty in the past with different network providers, some requiring deviceside=true others deviceside=false, and no real way to know until the first support call for that network came in.

天色我想要实现的是从连接顺利拿到了进度条的响应。

Mostly what I'm trying to achieve is responsiveness from the connection to get a smooth progress bar.

原谅我这么说,但进展顺利栏是锦上添花 - 不错的,看看,但应用程序的功能,可靠性或耐用性并不重要。 。可能的 HTTP 在这种情况下

Pardon my saying so, but a "smooth progress bar" is "gilding the lily" - nice to have and look at, but not critical to the application's function, reliability or robustness. Go with what is more robust and reduces code size - likely http in this case.

更多推荐

是套接字连接不是http上黑莓更快?

本文发布于:2023-10-04 05:25:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1467125.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:更快   黑莓   http

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!