i am currently doing a school project which requires me to convert embedded vb codes to .net framework. In embedded vb, the component WInsock was used. However in .net i was not able to find the component. Is winsock available in Visual Studio where i can drag and drop Are there other alternatives to using WInsock Please help. Thanks.

USing Winsock in .net framework
oag_hboyce
.NetProgrammer
wdc1
thanks. i found this program which was originally in C# and i converted it into vb.
Private m_DataBuffer As Byte() = New Byte(10) {} Private m_asynResult As IAsyncResult Public pfnCallBack As AsyncCallback Public m_socClient As Socket Public theSocPkt As CSocketPacket = New CSocketPacket Private Sub cmdConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdConnect.Click Trywhen i activesync the client program into the pocket pc. i typed the loop back ip 127.0.0.1 in the "txtIPAddr" textbox, it came out this error:
"No connection could be made because the target machine
actively refused it."
then i typed my computer ip 172.17.168.81 in the in the "txtIPAddr" textbox, which came out this error:
"an exisiting connection was forcibly closed by the remote host."
here is the client program coding for the connection part. did i used the wrong ip or the coding is totally wrong
m_socClient =
New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) Dim ip As IPAddress = IPAddress.Parse(txtIPAddr.Text) Dim iPortNo As Integer = System.Convert.ToInt16(txtPort.Text) Dim ipEnd As IPEndPoint = New IPEndPoint(ip.Address, iPortNo)m_socClient.Connect(ipEnd)
EnableCommands(
False)WaitForData()
Catch se As SocketExceptionMessageBox.Show(se.Message)
EnableCommands(
True) End Try End Sub End Class Public Class CSocketPacket Public thisSocket As System.Net.Sockets.Socket Public dataBuffer As Byte() = New Byte(1) {} End ClassGShaw
Unfortunately we can't provide tutorials and debugging support through this forum.
MSDN is the place for tutorials and documentation. Product support provides support services.
If you have a specific question we will be glad to help. Please consult the Socket API documentation and related books before you post questions.
Thanks and good luck.
CVL
However there is a complete Winsock API that you could use. This is not a
Windows FORMS control but we have .NET APIs under system.net namespace.
One could easily create a winsock cotrol based on this api though
Rathish P S
Thank you for your feedback.
Marm
However you have Socket APIS in the System.Net.Sockets.
You can look at the help in http://msdn.microsoft.com/net