I have created a TcpListener object and I execute the
START and ACCEPTSOCKET method.

When a remote connection is made I execute the Socket's
RECEIVE method. The data I recived is what I expect.

The problem:
When I try to execute the SEND method the remote host
never gets my message.

Any Ideal what is wrong?



My Code

Dim LocalIP As IPEndPoint
Dim Server As TcpListener
Dim BytesRead As Int32
Dim txtMessage As String
Dim Replay As String = "HTTP/1.1 200 OK <CRLF><CRLF>"
Dim ReplayMsg() As Byte

'-- Set up IP and Port number
LocalIP = New IPEndPoint(IPAddress.Parse("127.0.0.1"),
1902)
Server = New TcpListener(LocalIP)
Server.Start()
sClient = Server.AcceptSocket
BytesRead = sClient.Receive(Buffer, 0, Buffer.Length, 0)
txtMessage = CType(Encoding.ASCII.GetString(Buffer, 0,
BytesRead), String)

ReplayMsg = Encoding.ASCII.GetBytes(Replay)
sClient.Send(ReplayMsg, ReplayMsg.Length, SocketFlags.None)