Why Sockets Why UDP

ZeroEffect

Well-known member
Joined
Oct 24, 2004
Messages
180
Location
Detroit, MI
Ok I need help In vb6 winsock was easy to work with set the protocal tcp or udp. here is the local port bind, or listen. here is the remote ip and port then senddata or connect. ahhh life was good.

So I satdown to look at sockets and whoa, I need a tutorial. So I hunted and found some and I ether couldnt get them to work or I didnt understand what was going on. I found another tutorial in the tutorial section that Im making some progress, code is on another computer.

Could some one show me how to do this in VB.NET.

Code:
Winsock1.RemoteHost = "192.168.1.1"
Winsock1.RemotePort = "2002"
Winsock1.Bind 2002

Winsock1.SendData "data to send"

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    Winsock1.GetData wnskData
    Text1.Text = Text1.Text & wnskData & vbCrLf & vbCrLf
End Sub

I use UDP mainly and I figure if I get UDP down, learning TCP wont be that bad.

Thanks for any help you may have to offer.

ZeroEffect
 
Last edited by a moderator:
Back
Top