Solved

how do I get the get connected socket

Posted on 2011-03-02
6
226 Views
Last Modified: 2012-06-21
how do I get the get connected socket

for example

            strcpy(resultBuf,inBuf);
            errcnt = 0;
            while( sendto(listen_socket, resultBuf, strlen(resultBuf) + 1, 0, (struct sockaddr *)&from, fromlen) == SOCKET_ERROR  )
                  {
                  if( errcnt++ > 4 )
                        {
                        DisplayMsg("send of resultBuf packet failed");
                        WSACleanup();
                        break;
                        }
                  }

in a next program I need to find the listen socket to get the message. that I am sending back the send is from a C code and I am trying to get that message send in VB6 code
0
Comment
Question by:1030071002
[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
  • 4
  • 2
6 Comments
 
LVL 19

Accepted Solution

by:
Rimvis earned 500 total points
ID: 35054010
Hi1030071002,

Take a look here:


Introduction to Visual Basic Socket Programming
http://www.osix.net/modules/article/?id=25

0
 

Author Comment

by:1030071002
ID: 35058556
I am looking for UDP
0
 
LVL 19

Assisted Solution

by:Rimvis
Rimvis earned 500 total points
ID: 35066186
Does this help:

VB6 - Winsock, Auto find server using UDP Broadcast (LAN ONLY)
http://www.vbforums.com/showthread.php?t=422722
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:1030071002
ID: 35084246
you guys know any good book on socket programming
0
 

Author Comment

by:1030071002
ID: 35365823
made a mistake please cancel
0
 

Author Closing Comment

by:1030071002
ID: 35365829
book was not enough to solve the situation
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

749 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