Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

how do I get the get connected socket

Posted on 2011-03-02
6
Medium Priority
?
232 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
  • 4
  • 2
6 Comments
 
LVL 19

Accepted Solution

by:
Rimvis earned 1500 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 1500 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month20 days, 23 hours left to enroll

810 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