Winsock

D

Thread Starter

David Bacc

I am trying to set up a program that enables two way communication between two or more PCs. I have it set up using winsock, but the messages will only flow one way. What do I need to do so that the other computer can respond
 
J

John Messinger

L
Interesting. I just finished creating a Winsock lab that does exactly what you are asking for. If you would like the source code email me at
[email protected].

Essentially, if you have made one way communication using, you essentially check the connection state of the server winsock. If it is connected you use the SendData method. For example:

If (tcpServer.State <> 7) Then
Exit Sub
End If
tcpServer.SendData txtSendData.Text

The above code checks to see if winsock tcpServer is connected. If not exit sub. If it is, send data in textbox named txtSendData.Text

The lab I have created allows a client to access a server app interfaced to a process via a parallel port A/D D/A. The client then controls the process. (I course you wouldn't do this with a critical process where safety or downtime were
priorities).

Len Klochek
Seneca College
 
Top