473,394 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Protocols

ANGELSDAGGER
If you're sending something down a socket in Winsock (VB.NET), does anyone know how to add the protocol tags?

i.e.

socket.SendData(Usname & "|" & pass) <<< I have this but I need the server to identify what kind of data is being sent. I was told to you protocols such as

EHLO and MAIL.

Anyone know?
Aug 9 '07 #1
3 1959
Plater
7,872 Expert 4TB
Firstly, what are you trying to do exactly?

EHLO and MAIL are all commands in the smtp protocol (which can be googled to find the RFC explaining it)

And generally anything with a password (in smtp and actually http) is sent base64 encoded.
Aug 9 '07 #2
My program was working fine, but my lecturer said to me that the server has to be able to identify the type of message being sent and you do this using protocols. But I'm thinking if it ain't broke, don't fix it.

Though I am now getting an error in my socket.SendData statement.

Exception from HRESULT: 0x800A9C46

As soon as I type the username and password in I get that error. I will post the code here for you to look at.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Imports MSWinsockLib.ProtocolConstants
  3. Imports MSWinsockLib.StateConstants
  4. Imports MSWinsockLib
  5.  
  6. Class Form1
  7.  
  8.     Dim WithEvents socket As New Winsock
  9.  
  10.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  11.         '* Local Machine Properties.
  12.  
  13.         '*Set the port.
  14.         socket.RemotePort = 1001
  15.         socket.RemoteHost = "192.168.0.171"
  16.         '* Now connect
  17.         socket.Connect()
  18.  
  19.  
  20.  
  21.     End Sub
  22.  
  23.     Private Sub socket_DataArrival(ByVal bytesTotal As Integer) Handles socket.DataArrival
  24.         '* Invoke getdata maethod and put data into a string
  25.         '* named strdata
  26.         Dim strdata As String = ""
  27.         socket.GetData(strdata, vbString)
  28.         Form2.lstbox5Entries.Items.Add(strdata)
  29.         Show(Form2)
  30.     End Sub
  31.  
  32.  
  33.     Private Sub btnEnter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEnter.Click
  34.  
  35.  
  36.         Dim pass As String
  37.         Dim Usname As String
  38.         pass = txtboxPassword.Text()
  39.         Usname = txtboxUsrName.Text()
  40.         MsgBox(Usname)
  41.         socket.SendData(Usname & "|" & pass)
  42.         txtboxUsrName.Text = ""
  43.         txtboxPassword.Text = ""
  44.     End Sub
  45. End Class
  46.  
  47.  
Aug 9 '07 #3
Plater
7,872 Expert 4TB
I am unfamiliar with that kind of error since it's related to VB and not VB.NET.
You could try having someone move your question there for better assistance.
Aug 9 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Alexander Schumann | last post by:
Hello everyone, We are building a new web based e-mail client "Fiezel" that will support IMAP, POP3 and SMTP protocols. Will be written in php4. I am trying to collect all the infomation on SNMP...
0
by: Erik Max Francis | last post by:
Is there any prohibition against mixing different protocols within the same pickle? I don't see anything about this in the Python Library Reference and, after all, the pickle.dump function takes a...
3
by: Efrat Regev | last post by:
Hello, I was wondering whether there are any Python modules for various Internet protocols, e.g., is there something similar to import ftp client = ftpopen(...) and so on.
7
by: rdh | last post by:
Hi all, I am in process of developing a Server in C++ supporting multiple protocols. The server will be exposing various functionalities, and the clients can communicate over any of the...
2
by: Mark Olbert | last post by:
I'm looking to create a blogging component (or find one) that would basically be a "drop in" on an ASP.NET page (i.e., I don't want full blown blog theme management and page configuration...
0
by: John | last post by:
Hi, All, I have a web method like this: public string test(int32 i) { return i.ToString(); } and If I pass an empty string to test it by using HTTP POST I got the
1
by: Mae Lim | last post by:
Dear all, I'm having problem with C# Web Services, in the Web Services it suppose to call another Web Services to return XmlNode to current Web Services. Below is the sample code :- ...
3
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : ...
1
by: jayhunters14 | last post by:
Hi everyone, i am an undergrad in physics.my thesis is about GPRS.i have a wireless module that sets up a connection to the internet. when i connect to the web server it can communicate using http...
0
by: John H | last post by:
Hi, have read quite a few articles http://www.devx.com/codemag/Article/33655/0/page/6 http://msdn.microsoft.com/en-us/library/bb332338.aspx and still slightly confused as to what protcols can...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
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,...
0
Oralloy
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...

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.