Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

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 couldn't get them to work or I didn't understand what was going on. I found another tutorial in the tutorial section that I'm making some progress, code is on another computer.

 

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

 

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 won't be that bad.

 

Thanks for any help you may have to offer.

 

ZeroEffect

Edited by ZeroEffect

If you can't find it, Build It.

 

There is no place Like 127.0.0.1 also don't forget 1 + 1 = 10

Posted

Thanks PlausiblyDamp, I have been lookiing at that one I'm starting to understand it. Are there any others?

 

Thanks

 

ZeroEffect

If you can't find it, Build It.

 

There is no place Like 127.0.0.1 also don't forget 1 + 1 = 10

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...