I need to write a program, which uses both protocols -TCP and UDP (my project in university). Question: is it possible (in theory) to use both protocols in the one application? Because I already tried to do this(vb 6.0), and the i get error - "invalid operation at current state"
Private Sub Form_Load()
With UDPSOCK
.RemoteHost = "192.168.1.203"
.RemotePort = 5510
.Bind 5510
End With
With TCPSOCK
.Protocol = sckTCPProtocol
.RemoteHost = "192.168.1.203"
.RemotePort = 5510
.Bind 5511
End With
End Sub
Private Sub TCP_Mode()
TCPSOCK.Connect ' ERROR HERE
TCPSOCK.SendData "Retransmission"
End Sub
This is a little part of my code. UDP protocol work perfect (send and receive). But when i try to call TCP_Mode() i get an error "invalid operation at current state". Thanks very much to all.