Hello,
I am trying to send a command via a tcp socket. this command is received by the receiver (external device) as ansi text.
How can I implement this?
Greetings
KL
I am trying to send a command via a tcp socket. this command is received by the receiver (external device) as ansi text.
How can I implement this?
B4X:
Private Sub send_button_Click
If Astreams.IsInitialized = False Then Return
If send_edit.Text.Length > 0 Then
Dim sNewLine As String
sNewLine = send_edit.text & Chr(13)
Dim buffer() As Byte
buffer = sNewLine.GetBytes("ANSI")
Astreams.Write(buffer)
ToastMessageShow("Sending:" & sNewLine,False)
Log("Connect: send_button_Click | send: " & send_edit.Text)
End If
End Sub
Greetings
KL