Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
Winsock1.Close
Winsock1.Accept requestID
If Winsock1.State = sckconnect Then
MsgBox "It IS connected in ConnectionRequest", vbSystemModal, "#"
Winsock1.SendData "<body><h1><center>ConReq OK..</center></h1></body>"
ElseWinsock1.SendData "<body><h1><center>ConReq OK..</center></h1></body>"
MsgBox "Its NOT connected in ConnectionRequest", vbSystemModal, "!"
End If
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim data As String
Winsock1.GetData data
MsgBox data, vbSystemModal, "Data Recieved:"
If Winsock1.State = sckconnect Then
MsgBox "It is connected in DataArrival", vbSystemModal, "#"
Winsock1.SendData "<body><h1><center>ConReq OK..</center></h1></body>"
Else
MsgBox "Its NOT connected in DataArrival", vbSystemModal, "!"
End If
Winsock1.Close
End Sub
'----------------------------------------------
*************** Please use [highlight=vb]..your code.. [/highlight] when posting code!
When you have received the working answer to your question,
please mark it as *SOLVED* + Your Questions Title ...using your Thread's Tool menu.
Also try to point out what answer made it work for you, or edit your first post to contain a quote of the correct answer...
Please Answer All Questions With Working Code Examples...