Login  
Search All Forums
Dart Home | PowerTCP Sockets for .NET | Custom Development Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
AuthorForum: PowerTCP Sockets for .NET (Secure and Standard)
Topic: .NET socket Byte Stream stability
brunp

From: Ottawa, ON Canada
Posts: 6
Member Since: 04/12/06
posted June 17, 2006 10:07 PM

I am using the DART Socket libraries and using the option to receiving the byte array instead of a string as I have to look for specific byte sequences not represented in the stream.

However, it appears from time to time, NULL values
appear within the message?

Any ideas on why this is happening?

Thanks
Paul
Raj

From: Rome, NY, USA
Posts: 389
Member Since: 02/01/06
posted June 19, 2006 12:54 PM

I tried replicating this issue using the Chargen and TCP Client samples.
The TCP Client uses String Data-Type for received segments, however I changed it to use Byte Array as you were using. And it worked fine.

Do you see the same problem if you try this with the samples?

And why do NULL values look incorrect.
If you are using ByteArrays instead of strings, it leads me to believe that you are working with binary data instead of string data. A Null "character" just means a byte of value 0.

-Raj
brunp

From: Ottawa, ON Canada
Posts: 6
Member Since: 04/12/06
posted June 19, 2006 3:11 PM

The reason I am using a Byte Array is due to the fact that I receive ENQ/ACK/NAK and STX byte headers in my message stream exchange. Typically, my message occurs between an STX and ETX byte and the contents in the middle can be converted to a string afterwards.

I am not sure if I can use a string and then look at position 0 to see if I encounter an ENQ/ACK/NAK or STX parameter?

Thoughts..

Paul
Raj

From: Rome, NY, USA
Posts: 389
Member Since: 02/01/06
posted June 20, 2006 5:18 PM

Hello,

Please note that String manipulation can be done on the string to look at position 0.
However your approach of using byte should also work. I am still not clear on what is the issue with NULL values?
Is it that you don't expect Null values from the server?

 I hope you have checked with the server and referred the trace logs, to
 make sure, client receiving what the server is sensing.
Trace logs can be created using Trace Event, refer the help file for
details.

Please tell me the exact sequence of bytes that you are receiving, and the exact sequence of bytes that you are expecting. Maybe that will help us understand the problem that you are attempting to report.

Have a nice day ahead.

Regards,
Raj
brunp

From: Ottawa, ON Canada
Posts: 6
Member Since: 04/12/06
posted June 21, 2006 6:46 AM

Problem resolved.....it was a typo in the code.

Paul
Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX