Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 103,227 times

Contents

Related Categories

WinSock Control - Methods

Methods

All the methods of the WinSock control are explained in the table below

Property Description
Accept Accepts a Connection Request. Normally used in the ConnectionRequest Event Procedure
Bind Binds the control to a specific port and adapter. Use this if you have multiple Protocol adapters
Close Closes the current connection
Connect Attempts to connect to the specified PC
GetData Gets the data that has arrived. Clears the data buffer.
Listen Listens on the specified port
PeekData Looks at incoming data without removing it from the buffer.
SendData Sends data when a connection is established

James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.

Comments

  • Re: Re:

    Posted by zurna9 on 20 Feb 2008

    Make sure that you have a reference to the winsock ocx, and a winsock control in the project and verify that its called tcpClient (you can prob add a line like Dim tc...

  • Re:

    Posted by sandeep patil on 13 Feb 2008

    Hello, I was reading the "WinSock Control - Creating a Server" article
    I followed it exactly the way it was done on the page.

    I get the following error when testing my a...

  • Re: [78] WinSock Control

    Posted by sambariramesh on 15 Oct 2007

    akumar, you don't simply copy the EXE file on to other system. Use Package and Deployment wizard to make setup file so that it includes the winsock.ocx and other neccessary ...

  • Re: [78] WinSock Control

    Posted by akumar118 on 04 Aug 2007

    How to distribute MSwinsock.ocx along with the programm.
    The client and Server is working in my pc. But when I executed the exe file in another pc
    its giving me error.

    Can u please guide.

  • Re: [78] WinSock Control

    Posted by zurna9 on 16 May 2007

    you would either have to relay the message via the server -


    ie client sends message >>>>> server >>>> server forwards to other client


    or you would have ...