Results 1 to 40 of 163

Thread: [RESOLVED] [2008] Can I add a TCPClient Component

Threaded View

  1. #11
    New Member
    Join Date
    Jul 2008
    Posts
    4

    Re: [RESOLVED] [2008] Can I add a TCPClient Component

    I haven't created a datareceived event handler because i am quite new to vb and not sure how to. At the moment, the code on the client side is exactly the same as your example on the first page but has the code in my previous post in the messagereceived sub. So it looks like:

    Code:
    Private Sub messageReceived(ByVal message As String)
            Dim c() As Char = message.ToCharArray
            Dim d() As Byte = System.Text.Encoding.Default.GetBytes(c)
            My.Computer.FileSystem.WriteAllBytes("C:\image.jpg", d, False)
    End Sub
    I have read the examples for file transfers on the thread you mentioned and am wondering if I would be able to add the FileTransferSend class to the server and the FileTransferReceive class to the client. Could I send a message from the client to the server requesting it to start the FileTransferSend and then start the FileTransferReceive for the client. I am assuming the file transfer classes would have to use a different port to connect.

    EDIT: I managed to get it working using your example on the thread you suggested. It works perfectly. Thank you for all your help.
    Last edited by Jk108; Jul 8th, 2008 at 11:06 AM.

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