send data to browser with winsock?
I am making a small server application for windows. I want to be able to send a image to the browser after a request has happend. I have made the server part, using winsock and listen commands. I know it would have something to do with senddata command, but I keep getting errors. Can anyone help, please. Source below.
Private Sub tcpServer_ConnectionRequest(Index As Integer, ByVal requestID As Long)
Dim a As String
Dim b As String
Dim c As String
Dim d As String
a = CStr(requestID)
b = CStr(Index)
c = "Hello" ' just testing text
d = tcpServer(Index).RemoteHostIP
If Index = 0 Then
intmax = intmax + 1
Load tcpServer(intmax)
tcpServer(intmax).LocalPort = 0
tcpServer(intmax).SendData (c) ' just testing text
End If
End Sub
[email protected]
Re: send data to browser with winsock?
get rid of the () around your 3 so its something like this
senddata c
(where c is = to "test")