Results 1 to 2 of 2

Thread: UDP receiver

Hybrid View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2003
    Location
    Australia
    Posts
    29

    Unhappy UDP receiver

    Hi all,

    I am making a small app to receive UDP messages from a number of different IP addresses. I have something similar to that seen below to receive the packets but where do i set the ports and the like??


    Private Sub Winsock_DataArrival(ByVal bytesTotal As Long)
    Dim UDPData As String

    Winsock.GetData UDPData, vbstring

    'the data then needs to be broken up here

    End Sub


    The data received will contain an IP address and a 4 bit binary number. i need to split the data up and log it. i am unsure of how to do this?? i dont really know what i am doin so any help would be much appreciated!!

    Thanks

    Chris

  2. #2
    Addicted Member
    Join Date
    Mar 2002
    Location
    Lithuania
    Posts
    165
    VB Code:
    1. YourNumber = Mid(UDPData, Len( Winsock.RemoteHostIP)+1)
    P.S. Sorry for my poor English...

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