DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2009
    Location
    United Kingdom
    Posts
    84

    Winsock to connect three systems

    HI

    I am using winsock control to communicate two PCs from a third PC. It just connects to one PC. In the third PC I have used two winsock controls. Here is a sample piece of code

    If clientsocket1.CtlState <> MSWinsockLib.StateConstants.sckConnected Then
    RTB.SelectedText = "Server # 1 is not connected"
    Else
    clientsocket1.SendData(clienttextstring.Text)
    End If

    If clientsocket2.CtlState <> MSWinsockLib.StateConstants.sckConnected Then
    RTB.SelectedText = "Server # 2 is not connected"
    Else
    clientsocket2.SendData(clienttextstring.Text)
    End If


    Any help would be appreciated?

    Regards

    Faisal

  2. #2
    Join Date
    Apr 2009
    Location
    United Kingdom
    Posts
    84
    Hi

    After introducing some time delay between two if statements , it seems fine

    Regards

    Faisal

  3. #3
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,649
    What code did you end up with?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Replies: 0
    Last Post: 10-14-2008, 02:46 PM
  2. Replies: 0
    Last Post: 10-14-2008, 02:44 PM
  3. Winsock connection with dataproject
    By westweb in forum VB Classic
    Replies: 2
    Last Post: 06-18-2007, 02:33 PM
  4. winsock wont connect ( code included )
    By vchatlive in forum VB Classic
    Replies: 2
    Last Post: 01-13-2007, 05:33 PM
  5. VB6 Winsock TCP/IP won't connect
    By dmb_job in forum VB Classic
    Replies: 11
    Last Post: 10-11-2006, 10:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links