通过TCPClient发送数据 [英] Sending data via TCPClient

查看:296
本文介绍了通过TCPClient发送数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi @ all!


为了与Oracle-Forms应用程序和另一个应用程序通信,我们决定编写.NET网络接口。


For communicating with an Oracle-Forms Application and another application we decided to program a .NET Network interface.

为了从Oracle-Forms发回结果和接收命令,我们决定通过套接字连接实现这个。
此时我的问题是,我需要传输至少2个数据字。第一个是我在.NET应用程序中执行的结果,另一个是END。这标志着我现在的答案已经完成。 (请不要告诉我一些关于这一点的事情 - >这不是我的想法:))。

For sending back results and receiving commands from Oracle-Forms we decided to implement this via a socket connection.
At this point my problem is, that I need to transmit at least 2 datawords. The first is the result of my doing within my .NET Application and the other one is END. That marks that my answer is complete now. (Please do not tell me something about that -> It was not my idea :)).

问题在于我传输结果和"结束"。在我的程序代码中的两个步骤(我在tcpclient中为每个命令调用一次send方法,因此一个用于结果,一个用于"END")。

The Problem is that I transmit the result and the "END" in 2 steps within my programcode (I call the send method within the tcpclient for each command one time, so one for the result and one for the "END").

我们的表单应用程序开发人员显示我在文本框中发回的结果,在此文本框中是:result = HugoEND。

Our Forms Application Developer shows my result that I sent back within a textbox and within this textbox is: result=HugoEND.

但结果= Hugo已在第1步发送,第二步是"结束"。是我的程序发送的。但不是在一起,因为它在文本框中显示。

我在tcpclient类中有一个sendbuffer或者他为什么不发送2个包?

But result=Hugo has been send at 1st and in the second step "END" was sent by my program. But not together as it is shown in the textbox.

My be there a sendbuffer within the tcpclient class or why doesn't he send 2 packages?

请帮助我:)。
非常感谢提前



Please help me :).
Many thanks in advance
Martin

推荐答案

TCP / IP是一个数据流。您无法控制数据包的数量。

-Steve
TCP/IP is a stream of data. You cannot control the number of packets.

        -Steve


这篇关于通过TCPClient发送数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆