Solved

help! UDP

Posted on 1998-07-20
2
193 Views
Last Modified: 2013-11-13
i am new at vb, using vb5. i am trying to send text from a textbox using winsock1.senddata text1.text to remotehost, my problem is i can send the data, i can see the modem icon blink, but the host i am sending to cant get to it, i use winsock1.getdata Text, byval to retrieve the data ( i read this all from the VB helpfiles), only if the host send me data after i have send it data then we can send text back and forth, seems like there most be somesort of handshaking before we can send and retrieve data, is there anyway around this? where it does not need the host to reply?  meaning i want to be able to just send data then it will place it in a textbox. thanks
0
Comment
Question by:sunsun
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:sunsun
ID: 1466216
Edited text of question
0
 

Accepted Solution

by:
DanJenkins earned 50 total points
ID: 1466217
For UDP there is no handshaking required.  If App1 send to App2 the message should be proccesed and displayed, NO acknowledgement is required from App2.

Add the Winsock Control to your Form.
On the property page for the Winsock Control set the following:
Change the Protocol to: sckUDPProtocol

The name will default to Winsock1.

Private Sub Form_Load()
  Winsock1.RemoteHost = "Name of far-end computer"
  Winsock1.RemotePort = 'any integer above 1000
  Winsock1.Bind XXXX 'any integer above 1000 but different from
                     'the RemotePort value.
End Sub

Private Sub Text1_Change()
  Winsock1.SendData Text1.Text
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotla as Long)
  Dim sText as String
  Winsock1.GetData sText
  Text1.Text = sText
End Sub

This does work & does not require any acknowledgements.

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Part One of the two-part Q&A series with MalwareTech.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question