Solved

how do I get the get connected socket

Posted on 2011-03-02
6
223 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 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…

911 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now