Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Telnet (winsock) Truncating

Status
Not open for further replies.

kennedymr2

Programmer
May 23, 2001
594
AU
I have written a simple Telnet program using winsock.

I have downloaded several other example programs, and all of them have the same problem .

95% of the time all data is received ok.

But on occassions where the traffic input is busy,some of the data received is truncated.

ie. it just completely misses the data.

It is rather random...

?? Is there a way around this problem, or is there a .ocx or .dll i can download and use instead..

Appreciate any help..............Kennedymr2
 
Lots of people write what they call Telnet clients but are actually just dumb Raw TCP clients. Telnet is a protocol layered on top of TCP. There is a control layer of session and option commands and then a presentation layer of terminal emulation on top of that.

Most commonly these naive programs trip up when the server sends a control layer request that demands a proper response before allowing application level traffic to continue. However it is possible for such a program to be thrown off by terminal emulation layer commands as well.


There are 3rd party controls and classes that implement a more complete version of Telnet. The only free ones that I know of use blocking calls though, and are usually only useful for scripts and such.

The Telnet RFCs describe what your program must implement to be successful. In many cases you only need parts of RFC 854 and 855 plus a few other things that depend on the types of servers you want to interoperate with.


If you are having even 95% success though you may be working with a server that will accept raw (not really Telnet) client connections. In that case you may just have some buggy code in your Winsock communication logic. As long as you are using the VB6 SP6 version of the Winsock control (which is fairly well debugged) it probably isn't the control that is at fault.
 
dilettante Thanks for your reply, much appreciated...

My program is just receiving raw data stream from a remote server. I am rety sure is not expecting and replies.

I have had a pretty good look around the internet..including tek-tips and quite a few people have this problem.. but i cannot find a real good solution

Regards Kennedymr2
 
Can you provide links to some of these other problem reports? Seriously, I haven't heard of this one before.
 
dilettante...

Appreciate your interest in helping me this problem..

I have even tried using vb2008.net and get the same problem..

I seem to get rather big records all 100% ok... but mainly run into the problem with one packet..data record..

It is allways the front..beginning of the record...not allways in the same spot..

This record does have some different characters in eg
1/-|2/-|3/-|4/-|5/-|6/-|7/-|8/-|" could his be the problem??

It receives all other records 100% ok.... very fustrating !!@


I have found other people with this problem






"""Before I tried the ITC, I used the Microsoft Winsock Control, but with that control, I had problems with web pages being truncated causing my HTML strip out routine to malfunction. We don't want to use Microsoft Internet Controls either at the request of my client.


Appreciate "any" help.... I am beginning to hate Winsock @!!@!@


Regards Kennedymr2
 

dilettante (MIS)

Just solved the problem... there were some strange characters in the steam... once i filtered them out it all seems to work.

Thank goodness... i almost went MAD !!!!


Appreciate you assistance....



Regards kennedymr2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top