Helpful Information
 
 
Category: ColdFusion Development
sending hex data to a socket

Hi

I want to use the winsock object to send hex data to a client. When I do this in VB it works fine. In CF I can connect to the socket but can only send data a string and not a hex value i.e: 0xFF11

Here is the VB:
Private Sub cmdRTS_Click()
If statRTS = True Then cmd = &H10FF Else cmd = &H11FF
Winsock1.SendData cmd
End Sub

Here is the CF:
SockLite.SendData(0xFF11);
writeoutput("Send data" & "<br>");
writeoutput(SockLite.GetErrorDescription(SockLite.LastSockErr) & "<br>");

It seems to be the same with PHP. It only wants to send string values ie: "xyx".

Any Idea why?

Thanks, Mat










privacy (GDPR)