Hi
i'm trying to code simple nntp client with vb.net and sockets client class
the problem is the machine keep stuck (probbley beacuse it ain't gettin`
data from the server) after the user name sent to the server when it's try
to read the stream, i checked it out in telnet and server send stream after
i send the user name any idea why it's not workin`?
here's the code:
Imports System.Net.Sock ets
Imports System.Text
Public Class Form1
Private Sub Form1_Load(ByVa l sender As Object, ByVal e As System.EventArg s)
Handles Me.Load
Dim tcpClient As New System.Net.Sock ets.TcpClient()
Dim returndata As String
Dim bytes(tcpClient .ReceiveBufferS ize) As Byte
Dim sendBytes As [Byte]()
tcpClient.Conne ct("news.gigane ws.com", 119)
Dim networkStream As NetworkStream = tcpClient.GetSt ream()
' Read the NetworkStream into a byte buffer.
networkStream.R ead(bytes, 0, CInt(tcpClient. ReceiveBufferSi ze))
' Output the data received from the host to the console.
returndata = Encoding.ASCII. GetString(bytes )
textbox1.text = textbox1.text & Returndata
' Send user name to the server
sendBytes = Encoding.ASCII. GetBytes("AUTHI NFO USER ****")
networkStream.W rite(sendBytes, 0, sendBytes.Lengt h)
' Read the NetworkStream into a byte buffer.
networkStream.R ead(bytes, 0, CInt(tcpClient. ReceiveBufferSi ze))
returndata = Encoding.ASCII. GetString(bytes )
TextBox1.Text = TextBox1.Text & Returndata
' Send Paswod to the server
sendBytes = Encoding.ASCII. GetBytes("AUTHI NFO PASS ****")
networkStream.W rite(sendBytes, 0, sendBytes.Lengt h)
' Read the NetworkStream into a byte buffer.
networkStream.R ead(bytes, 0, CInt(tcpClient. ReceiveBufferSi ze))
returndata = Encoding.ASCII. GetString(bytes )
TextBox1.Text = TextBox1.Text & returndata
End Sub
End Class 4 4347
"BiT" <sh********@wal la.comwrote in
news:Ka******** *************** *******@giganew s.com:
Hi
i'm trying to code simple nntp client with vb.net and sockets client
class
the problem is the machine keep stuck (probbley beacuse it ain't
gettin` data from the server) after the user name sent to the server
when it's try to read the stream, i checked it out in telnet and
server send stream after i send the user name any idea why it's not
workin`?
here's the code:
Have you looked at the Indy Socket class? I think it has a NNTP classes
prebuilt. Otherwise nSoftware's IPWorks package has a good NNTP client.
Also take a look at TCPTrace from PocketSoap. It's a free application
allowing you to see the TCP stream. AFAIK, you're supposed to get a return
code with every command you issue - are you getting those codes back? Maybe
you didn't send the end of line terminator so the server hasn't processed
the command?
I think i didn't send the end of line terminator, how do i do it?
thanks
"Spam Catcher" <sp**********@r ogers.comwrote in message
news:Xn******** *************** ***********@127 .0.0.1...
"BiT" <sh********@wal la.comwrote in
news:Ka******** *************** *******@giganew s.com:
>Hi
i'm trying to code simple nntp client with vb.net and sockets client class
the problem is the machine keep stuck (probbley beacuse it ain't gettin` data from the server) after the user name sent to the server when it's try to read the stream, i checked it out in telnet and server send stream after i send the user name any idea why it's not workin`?
here's the code:
Have you looked at the Indy Socket class? I think it has a NNTP classes
prebuilt. Otherwise nSoftware's IPWorks package has a good NNTP client.
Also take a look at TCPTrace from PocketSoap. It's a free application
allowing you to see the TCP stream. AFAIK, you're supposed to get a return
code with every command you issue - are you getting those codes back?
Maybe
you didn't send the end of line terminator so the server hasn't processed
the command?
"BiT" <sh********@wal la.comwrote in
news:Gq******** *************** *******@giganew s.com:
I think i didn't send the end of line terminator, how do i do it?
You could try sending VBCRLF (return character).
Works Great
thanks
"Spam Catcher" <sp**********@r ogers.comwrote in message
news:Xn******** *************** **********@127. 0.0.1...
"BiT" <sh********@wal la.comwrote in
news:Gq******** *************** *******@giganew s.com:
>I think i didn't send the end of line terminator, how do i do it?
You could try sending VBCRLF (return character).
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Arlequín |
last post by:
Hello, there!
Is there any possibility to access a PHP newsgroup though a news
client (i.e. Mozilla, Pan), using the NNTP protocol?
Thanks a lot
|
by: Mark |
last post by:
I'm looking for a set of php scripts that can read an nntp server, pull all
the posts from a newsgroup (text only, no images) and convert them to html
pages.
Perfect example is : http://www.woodworking-forum.com/woodworking/
I'd like to do this with a couple of my hobbies so that I can archive the
articles - yeah, I know google does it,...
|
by: NightChild |
last post by:
Does anyone know of a library that allows easy interaction with NNTP?
I'm not wanting to roll my own using PHP and sockets but want something
similar to Perls News::NNTPClient. I've done a Google search and keep
running into the Python library and the Perl library but nothing for PHP.
Any suggestions?
Thank,
NightChild
|
by: Craig Kenisston |
last post by:
Does this exist in the.net framework ? I can't find it. I could find SMTP,
though.
If it doesn't, could anybody recommend a component suite that includes smtp,
pop, nntp ? But mainly, that does include nntp.
Thanks,
|
by: Klaus Alexander Seistrup |
last post by:
Hi,
I need a Python NNTP module that is capable of doing "MODE STREAM" as
client and as server. Does anyone here know of such a module except
the twisted.protocols.nntp module?
Cheers,
--
Klaus Alexander Seistrup
| |
by: Hiran de Silva |
last post by:
Does anyone know if 2.0 (Beta) has an NNTP client component?
Thanks,
Hiran
|
by: Jim |
last post by:
Have you seen any NNTP classes that I may use or build upon to build a
simple newsreader/downloader?
Is there such a class in the .Net framework that I have overlooked? If not,
inclusion of RFC documented protocols would certainly be a good idea for a
class hierarchy in the .Net classes.
You could adopt and extend the classes at will. ...
|
by: Sandman |
last post by:
Ok, I do NOT want to *connect* to a NNTP server from PHP, I want to -
from a NNTP client - connect to a NNTP server that is powered by PHP.
Specifically, I want articles, forum posts and such from my web site
to be readable via a NNTP interface. So, when the client connects to
my server, a hierarchy might look like this:
...
|
by: Alexander Higgins |
last post by:
Hi,
I am working on an NNTP Client via windows forms and am actually try
to login into this group to no avail. I am sending
AUTHINFO USER username <where username=myemail address
AUTHINFO PASS password <where password=my groups.google password
Any suggestions, what am i doing wrong. I keep getting 502 permission
denied.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |