| Dart Home | PowerTCP Sockets for .NET | Custom Development | Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
| Author | Forum: PowerTCP Sockets for .NET (Secure and Standard) Topic: Problem With Full Duplex Communication... |
| alidehghan ali.a.dehghan@gmail.com From: Tehran Posts: 3 Member Since: 08/20/06 |
posted August 20, 2006 11:29 AM Hi, I am using SSL PowerTCP Socket, but I have lots of data in both ends, now I want to be able to begin send large data while begin receiving ... it is possible? How? Thanks in advance... |
| Amit From: Rome, NY USA Posts: 315 Member Since: 03/15/06 |
posted August 21, 2006 10:12 AM Hello, Before we begin, I would request you to please let us know whether you are using a trial version of the product, and if not, which licensed version of the product do you have running? Best Regards, Amit |
| alidehghan ali.a.dehghan@gmail.com From: Tehran Posts: 3 Member Since: 08/20/06 |
posted August 22, 2006 4:15 AM Trial Version ... |
| Amit From: Rome, NY USA Posts: 315 Member Since: 03/15/06 |
posted August 22, 2006 3:51 PM Hello, I have read your query and it is my understanding that you are looking to create an application which sends and receives at the same time. If this is the said scenario, then I would suggest you to use the asynchronous operations of the TCP component. The reason being that these operations occur without waiting for the action to complete before executing the next line of code. The following code snippet for VB.NET has worked fine at my end: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Connect to the Server on the Specified Port Tcp1.Connect("ServerName", ServerPort) 'Send some data Tcp1.Send("Any Data") 'Asynchronously Receive data 'EndReceieve Event will be raised when Completed Dim buffer(Tcp1.ReceiveBufferSize) As Byte Tcp1.BeginReceive(buffer) End Sub Private Sub Tcp1_EndReceive(ByVal sender As Object, ByVal e As Dart.PowerTCP.SslSockets.SegmentEventArgs) Handles Tcp1.EndReceive 'Receive Operation is Complete If e.Exception Is Nothing Then 'Display the data received Debug.WriteLine(e.Segment.ToString()) End If End Sub If you are using any other development environment, then do let me know so that I can provide you the appropriate code snippet. I hope this will be of help. Have a nice day. Best Regards, Amit |
| alidehghan ali.a.dehghan@gmail.com From: Tehran Posts: 3 Member Since: 08/20/06 |
posted August 23, 2006 5:02 AM Dear Amit, Thanks for your sample, but you have not send and receive at the same time... but you first send some data and the listen for receiving some data ... this is half duplex (not full duplex)... full duplex means that beginSend and BeginReceive apply at the same time on one connection... May you continue helping me.... Thanks |
| Amit From: Rome, NY USA Posts: 315 Member Since: 03/15/06 |
posted August 23, 2006 4:28 PM Hello, I would suggest you to please follow the following steps: (1) Call BeginReceive first (2) Now, call the Send method (3) Now, call BeginReceive again in the EndReceive event. This way, you should be able to send and receive data at the same time. I hope this will be of help. Have a nice day. Best Regards, Amit |
| Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|