471,310 Members | 1,032 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

vb.net whois and RPSL whois format

i use this code
Public Function WhoISLookup(ByVal sAddress As String, ByVal sServer As
String) As String
Dim sResponse As String = "nothing"
sAddress += "\r\n"
sAddress = "194.224.52.36" & ControlChars.CrLf
sAddress += ControlChars.CrLf
Dim oTCP As TcpClient = New TcpClient
Try
oTCP.Connect(sServer, 43)
Catch ex As SocketException
Return ex.Message
End Try
Dim aAddress As [Byte]() = Encoding.ASCII.GetBytes(sAddress)
Try
Dim s As Stream = oTCP.GetStream()
s.Write(aAddress, 0, sAddress.Length)
Dim sReader As StreamReader = New StreamReader(oTCP.GetStream,
Encoding.ASCII)
Dim SB As New StringBuilder
While -1 <> sReader.Peek
SB.Append(sReader.ReadLine & vbCrLf)
End While
sResponse = SB.ToString
oTCP.Close()
Catch ex As Exception
Return ex.Message
End Try
Return sResponse
End Function

and i need to acces to each line when code arrives to while and
SB.Append(sReader.ReadLine & vbCrLf), but it doesn't read line to line , i
have seen in sReader a field named char buffer where the are all chars.
how could i read correctly line to line? or to mount the line character to
character.

Sorry but my english is ver bad.

Jul 21 '05 #1
0 1203

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by elyob | last post: by
6 posts views Thread by Fred | last post: by
2 posts views Thread by James | last post: by
5 posts views Thread by Gerrit Muller | last post: by
reply views Thread by Yair Nissan | last post: by
10 posts views Thread by Roel | last post: by
reply views Thread by eliss | last post: by
3 posts views Thread by Phillip B Oldham | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.