This is coming from a Windows 2003 Server to a HP Pocket PC (WinCE 2003)
over 802.11b. The device is on the Network and can be pinged, it can write
data to the Server stream - but not read the reverse.
I'd appreciate any help.
Server
------
Dim TcpC as New TcpListener(IPAddress.Parse("192.168.1.5"), 8500)
TcpC.Start()
Dim tcpclient As TcpClient = TcpC.AcceptTcpClient
Dim ns As NetworkStream = tcpclient.GetStream
Dim bytes() = System.Text.Encoding.ASCII.GetBytes("Testing Connection
Write")
ns.Write(bytes, 0, bytes.length)
tcpclient.Close()
TcpC.Stop()
Mobile
------
Dim tcpc As New TcpClient
tcpc.Connect(IPAddress.Parse("192.168.1.5"), 8500)
Dim bytes(30000) As Byte
Dim NS As NetworkStream = tcpc.GetStream
NS.Read(bytes, 0, CInt(tcpc.ReceiveBufferSize))
it fails on the last line giving an ArgumentOutOfRangeException saying that
IsNothing(bytes) = True.
--
Message posted via http://www.dotnetmonster.com