connection and transfer data


Dim blnConnected As Boolean
Private sub cmdConnect_Click()
wsPop.Close ‘close winsock
Do
DoEvents
Loop While wsPop.State sckClosed
wsPop.Connect txtServer.Text, txtPort.Text
End Sub

Private Sub cmdSend_Click()
wsPop.SendData txtSend
& vbCrLf
txtSend.SetFocus
End Sub

Private Sub wsPop_Connect()
blnConnected=True
txtSend.Enabled=True
cmdSend.Enabled=True
txtReceived.Text=”Connected” & wsPop.RemoteHost
End Sub

Private sub wsPop_DataArrival(ByVal bytesTotal As Long)

Dim StrData As String

wsPop.GetData strData
txtReceived.Text=txtReceived.Text & vbNewLine & strData
End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s