Hi All.
I am communicating with a device via TCP that requires plain text for its commands.
I am able to successfully connect to the device and then pass a login command (plain text) using:
- FYI OutputStream1 = Socket1.OutputStream
DIM sCommand as string
sCommand = "MY COMMAND" & CHR(13) & CHAR(10)
oTextWriter.Initialize(OutputStream1)
oTextWriter.Write(sCommand)
oTextWriter.Flush
however if I do:
Dim buffer() As Byte
buffer = sCommand.GetBytes("UTF8")
AStreams.Write(buffer)
It wont connect. I cant tell whats been received by the device I am connecting too.
I am suspecting the "UTF8" encoding might be causing an issue, so if it is, how can use the AsyncStreams to send plain text?
Jeremy
I am communicating with a device via TCP that requires plain text for its commands.
I am able to successfully connect to the device and then pass a login command (plain text) using:
- FYI OutputStream1 = Socket1.OutputStream
DIM sCommand as string
sCommand = "MY COMMAND" & CHR(13) & CHAR(10)
oTextWriter.Initialize(OutputStream1)
oTextWriter.Write(sCommand)
oTextWriter.Flush
however if I do:
Dim buffer() As Byte
buffer = sCommand.GetBytes("UTF8")
AStreams.Write(buffer)
It wont connect. I cant tell whats been received by the device I am connecting too.
I am suspecting the "UTF8" encoding might be causing an issue, so if it is, how can use the AsyncStreams to send plain text?
Jeremy