Private ns As NetworkStream
Private client As New TcpClient()
Public Function Open()
client.Connect(_server, _port)
ns = client.GetStream()
Dim strMessage As String = "Message" & ControlChars.CrLf
Dim sendBytes As [Byte]() = Encoding.ASCII.GetBytes(strMessage)
ns.Write(sendBytes, 0, sendBytes.Length)
End Function
I thought it was like this.
Public Function open()
Dim Proxy As New System.Net.WebProxy("http://" & _proxy & "/")
Dim strmessage2 As String = "CONNECT " & _server & ":" & "_port" & HTTP/1.0"
Dim Sendbytes2 As [Byte]() = Encoding.ASCII.GetBytes(strmessage2, 0, strmessage2.Length)
Return Sendbytes2
End Function
Private client As New TcpClient()
Public Function Open()
client.Connect(_server, _port)
ns = client.GetStream()
Dim strMessage As String = "Message" & ControlChars.CrLf
Dim sendBytes As [Byte]() = Encoding.ASCII.GetBytes(strMessage)
ns.Write(sendBytes, 0, sendBytes.Length)
End Function
I thought it was like this.
Public Function open()
Dim Proxy As New System.Net.WebProxy("http://" & _proxy & "/")
Dim strmessage2 As String = "CONNECT " & _server & ":" & "_port" & HTTP/1.0"
Dim Sendbytes2 As [Byte]() = Encoding.ASCII.GetBytes(strmessage2, 0, strmessage2.Length)
Return Sendbytes2
End Function