CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    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]




  2. #2
    Guest

    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")


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured