客户端同步发送:
dim sendSocket as Socket
Dim ipHostInfo As IPHostEntry
dim ipEnd as IpEndPoint
dim mag as byte()
dim byteSends as integer
sendSocket=New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
ipHostInfo=DNS.Resolve("SeverName")
ipEnd=new IpEndPoint(ipHostInfo.AddressList(0),11000)
sendSocket.Connect(ipEnd)
msg=system.text.encoding.ascii.getbytes("This is a message i want to send")
bytesends =sendsocket.send
sendSocket.Shutdown(SocketShutdown.Both)
sendSocket.Close()