BlackBerry 上的套接字编程

发布于 2024-12-23 03:20:35 字数 118 浏览 2 评论 0原文

我被困在黑莓客户端和java服务器之间创建套接字连接。我需要简单的示例代码,它扩展了黑莓示例代码中的套接字 API 示例。

我们有一个与 Android 系统通信的服务器,我们也需要它与黑莓客户端一起工作。

I am stuck creating a socket connection between blackberry client and java server. I need simple sample code which extends the socket API example from blackberry sample code.

We have a server that communicates with android systems and we need it to work with blackberry client as well.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情仇皆在手 2024-12-30 03:20:35

抱歉迟到了。由于评论长度,我在这里发表评论。 _screen.isDirectTCP() 不是 API 方法,因此我不确定此方法返回什么。但从方法名称/签名来看,我认为该方法仅用于检查设备上的 Direct TCP 连接是否可用。根据结果​​,应用程序将附加连接参数,例如“;deviceside=....”。

网络传输文章中,

如果您不希望您的应用程序依赖默认连接
前面几节中描述的类型,明确说明
通过将“deviceside =”参数添加到所需的连接类型
目标网址。如果应用程序将“;deviceside=true”附加到
目标 URL,则只能使用直接 HTTP 或 TCP 连接
尝试过。应用程序不会尝试连接到网络
使用 BlackBerry MDS。或者,如果应用程序附加
“;deviceside=false” 到目标 URL,然后仅应用程序
尝试使用 BlackBerry MDS 连接到网络。这
应用程序不会尝试使用公共网络连接到网络
IP网关。

另请查看此链接,什么是 - 建立 HTTP 或套接字连接的不同方法

Sorry for being late. And I am posting my comment here because of comment length. _screen.isDirectTCP() isn't an API method, so I am not sure what does this method return. But from the method name/signature I think this method is only used for checking whether Direct TCP connectivity is available or not on the device. Depending on the result, the application will append the connection parameter such as ";deviceside=....".

From the Network Transport article,

If you do not want your application to rely on the default connection
types described in the previous sections, explicitly state the
desired connection type by adding the “deviceside=” parameter to the
destination URL. If an application appends “;deviceside=true” to the
destination URL, then only a direct HTTP or TCP connection is
attempted. The application does not attempt to connect to the network
using the BlackBerry MDS. Alternatively, if an application appends
“;deviceside=false” to the destination URL, then the application only
attempts to connect to the network using the BlackBerry MDS. The
application does not attempt to connect to the network using a public
IP gateway.

Also please have a look at this link, What Is - Different ways to make an HTTP or socket connection.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文