I assume I don't know python. This script sends a simple string over lan to a lan address (from my pc to a python server)
-------------------------------------------------------
import socket
#
host ="192.168.0.17"
port =49280
#
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host,port))
#
s.sendall("set MIXER:Current/InCh/Fader/On 1 0 1\n".encode())
s.recv(1500)
s.close
-----------------------------------------------
I would like to send the same string but using vb6....
--------------------------------------------
Private Sub Command3_Click()
Winsock1.RemoteHost = "192.168.0.17"
Winsock1.RemotePort = 49280
Winsock1.Protocol = sckTCPProtocol
Winsock1.Connect
winsock1
Dim stringa1, stringa As String
Dim Data() As Byte
stringa = "set MIXER:Current/InCh/Fader/On 1 0 1\n"
Data = StrConv(stringa, vbFromUnicode)
Winsock1.SendData Data
End Sub
----------------------------------------------
but unfortunately it doesn't work. With the first script, my remote python server responds correctly, with the script in vb6 the server shows no signs of life Anyone can tell me what mistake I make? thanks to all and good continuation Mario
stringa1
for anyway? But your core problem may be silly use of C syntax to try to escape a linefeed character. – Bob77