Advertisement
Advertisement
| 02.07.2008 at 12:18PM PST, ID: 23145712 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: |
Dim lipa As IPHostEntry = Dns.GetHostEntry("127.0.0.1")
Dim lep As New IPEndPoint(lipa.AddressList(0), 11000)
Dim s As New Socket(lep.Address.AddressFamily, SocketType.Stream, ProtocolType.Tcp)
Try
s.Bind(lep)
s.Listen(1000)
While True
allDone.Reset()
'Console.WriteLine("Waiting for a connection...")
s.BeginAccept(New AsyncCallback(AddressOf Listen_Callback), s)
allDone.WaitOne()
End While
Catch ex As Exception
Console.WriteLine(ex.ToString())
End Try
|